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."],[[["DenseConnectedComponentsFinder is a class used to find connected components within a dense graph represented by integers."],["It provides methods to add edges (`AddEdge`), check connectivity between nodes (`Connected`), and retrieve component information."],["Users can access component details such as the root nodes (`GetComponentRoots`), component IDs (`GetComponentIds`), and the number of components (`GetNumberOfComponents`)."],["The class supports copy and move construction for efficient object management."],["It's specifically designed for dense graphs and requires setting the number of nodes explicitly if some nodes lack edges (`SetNumberOfNodes`)."]]],["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"]]