Definition
An instance S of the data type nodeset is a subset of the nodes of a graph G . S is said to be valid for the nodes of G .
#include < LEDA/graph/node_set.h >
Creation
node_set | S(const graph& G) | creates an instance S of type nodeset valid for all nodes currently contained in graph G and initializes it to the empty set. |
Operations
Implementation
A node set S for a graph G is implemented by a combination of a list L of nodes and a node array of list_items associating with each node its position in L . All operations take constant time, except for clear which takes time O(S) . The space requirement is O(n) , where n is the number of nodes of G .