Class graph::components¶
-
class graph
components¶ Represents a graph as a series of connected components.
The input graph may consist of many components, they will be separated in the construction.
Public Functions
-
const vector<int> &graph::components
nodes(int c) const¶ Get the set of nodes in a component.
-
int graph::components
size() const¶ Get the number of connected components in the graph.
-
int graph::components
num_reserved(int c) const¶ returns the number of reserved nodes in a component
-
int graph::components
size(int c) const¶ Get the size (in nodes) of a component.
-
input_graph &graph::components
component_graph(int c)¶ Get a mutable reference to the graph object of a component.
-
template <typename T>
bool graph::componentsinto_component(const int c, T &nodes_in, vector<int> &nodes_out) const¶ translate nodes from the input graph, to their labels in component c
-
template <typename T>
void graph::componentsfrom_component(const int c, T &nodes_in, vector<int> &nodes_out)¶ translate nodes from labels in component c, back to their original input labels
-
const vector<int> &graph::components