Node sets. More...
#include <ogdf/basic/GraphSets.h>
Public Member Functions | |
NodeSet ()=default | |
Creates an empty node set associated with no graph. More... | |
NodeSet (const Graph &graph) | |
Creates a new node set associated with graph . More... | |
const Graph & | graphOf () const |
Returns the associated graph. More... | |
const RS::list_type & | nodes () |
Returns a reference to the list of nodes contained in this set. More... | |
Public Member Functions inherited from ogdf::RegisteredSet< internal::GraphNodeRegistry, true > | |
RegisteredSet () | |
Creates an empty set associated with no registry. More... | |
RegisteredSet (const internal::GraphNodeRegistry &R) | |
Creates an empty set associated with registry R . More... | |
RegisteredSet (const RegisteredSet< internal::GraphNodeRegistry, OtherSupportsFastSizeQuery > &other) | |
Copy constructor. More... | |
list_type::const_iterator | begin () const |
void | clear () |
Removes all elements from this set. More... | |
const list_type & | elements () const |
Returns a reference to the list of elements contained in this set. More... | |
list_type::const_iterator | end () const |
void | init () |
Reinitializes the set. Associates the set with no registry. More... | |
void | init (const internal::GraphNodeRegistry &R) |
Reinitializes the set. Associates the set with registry R . More... | |
void | insert (element_type v) |
Inserts element v into this set. More... | |
bool | isMember (element_type v) const |
Returns true iff element v is contained in this set. More... | |
bool | operator() (element_type v) const |
Returns the same as isMember() to use an RegisteredSet instance as filter function. More... | |
RegisteredSet & | operator= (const RegisteredSet< internal::GraphNodeRegistry, OtherSupportsFastSizeQuery > &other) |
Assignment operator. More... | |
const internal::GraphNodeRegistry * | registeredAt () const |
Returns the associated registry. More... | |
bool | remove (element_type v) |
Removes element v from this set and return true iff v was previously present. More... | |
int | size () const |
Returns the number of elements in this set. More... | |
Private Types | |
using | RS = RegisteredSet< internal::GraphNodeRegistry, SupportFastSizeQuery > |
Additional Inherited Members | |
Public Types inherited from ogdf::RegisteredSet< internal::GraphNodeRegistry, true > | |
using | element_type = typename internal::GraphNodeRegistry ::key_type |
using | list_type = typename std::conditional< SupportFastSizeQuery, List< element_type >, ListPure< element_type > >::type |
Node sets.
Maintains a subset of nodes contained in an associated graph.
Provides efficient operations for testing membership, iteration, insertion, and deletion of elements, as well as clearing the set.
SupportFastSizeQuery | Whether this set supports querying it's size in constant instead of linear time (in the size). |
Definition at line 57 of file GraphSets.h.
|
private |
Definition at line 58 of file GraphSets.h.
|
inlineexplicit |
Creates a new node set associated with graph
.
Definition at line 64 of file GraphSets.h.
|
explicitdefault |
Creates an empty node set associated with no graph.
|
inline |
Returns the associated graph.
Definition at line 73 of file GraphSets.h.
|
inline |
Returns a reference to the list of nodes contained in this set.
Definition at line 70 of file GraphSets.h.