Sets the number of nodes in the graph. The graph can only grow: this
dies if "num_nodes" is lower or equal to any of the values ever given
to AddEdge(), or lower than a previous value given to SetNumberOfNodes().
You need this if there are nodes that don't have any edges.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["\u003cp\u003eDenseConnectedComponentsFinder is a class used to find connected components within a dense graph represented by integers.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to add edges (\u003ccode\u003eAddEdge\u003c/code\u003e), check connectivity between nodes (\u003ccode\u003eConnected\u003c/code\u003e), and retrieve component information.\u003c/p\u003e\n"],["\u003cp\u003eUsers can access component details such as the root nodes (\u003ccode\u003eGetComponentRoots\u003c/code\u003e), component IDs (\u003ccode\u003eGetComponentIds\u003c/code\u003e), and the number of components (\u003ccode\u003eGetNumberOfComponents\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eThe class supports copy and move construction for efficient object management.\u003c/p\u003e\n"],["\u003cp\u003eIt's specifically designed for dense graphs and requires setting the number of nodes explicitly if some nodes lack edges (\u003ccode\u003eSetNumberOfNodes\u003c/code\u003e).\u003c/p\u003e\n"]]],["The `DenseConnectedComponentsFinder` class in C++ identifies connected components within a graph of dense integers. Key actions include `AddEdge` to define connections between nodes and `Connected` to check if two nodes are connected. `FindRoot` retrieves the root node of a given node's set, while `GetComponentRoots` returns a list of all root nodes. Methods like `GetNumberOfComponents`, `GetNumberOfNodes`, and `GetSize` provide information about the graph. `SetNumberOfNodes` is used to define the graph's size. `GetComponentIds` returns the connected components.\n"],null,[]]