Simple node sets.
More...
#include <ogdf/basic/NodeSet.h>
Simple node sets.
A node set maintains a subset S of the nodes contained in an associated graph. This kind of node set only provides efficient operation for testing membership, insertion, and clearing the set.
- See also
-
Definition at line 56 of file NodeSet.h.
◆ NodeSetSimple()
| ogdf::NodeSetSimple::NodeSetSimple |
( |
const Graph & |
G | ) |
|
|
inlineexplicit |
Creates an empty node set associated with graph G.
Definition at line 59 of file NodeSet.h.
◆ ~NodeSetSimple()
| ogdf::NodeSetSimple::~NodeSetSimple |
( |
| ) |
|
|
inline |
◆ clear()
| void ogdf::NodeSetSimple::clear |
( |
| ) |
|
|
inline |
Removes all nodes from S.
After this operation, S is empty and still associated with the same graph. The runtime of this operations is O(k), where k is the number of nodes in S before this operation.
Definition at line 85 of file NodeSet.h.
◆ insert()
| void ogdf::NodeSetSimple::insert |
( |
node |
v | ) |
|
|
inline |
Inserts node v into S.
This operation has constant runtime.
- Precondition
v is a node in the associated graph.
Definition at line 70 of file NodeSet.h.
◆ isMember()
| bool ogdf::NodeSetSimple::isMember |
( |
node |
v | ) |
const |
|
inline |
Returns true if node v is contained in S, false otherwise.
This operation has constant runtime.
- Precondition
v is a node in the associated graph.
Definition at line 98 of file NodeSet.h.
◆ nodes()
Returns a reference to the list of nodes contained in S.
This list can be used for iterating over all nodes in S.
Definition at line 107 of file NodeSet.h.
◆ m_isContained
| NodeArray<bool> ogdf::NodeSetSimple::m_isContained |
|
private |
m_isContained[v] is true iff v is contained in S.
Definition at line 113 of file NodeSet.h.
◆ m_nodes
The list of nodes contained in S.
Definition at line 116 of file NodeSet.h.
The documentation for this class was generated from the following file: