53 template<
bool SupportFastSizeQuery = true>
112 return m_it[v].valid();
122 return *
m_it.graphOf();
134 template<
bool OtherSupportsFastSizeQuery>
140 template<
bool OtherSupportsFastSizeQuery>
bool isMember(node v) const
Returns true iff node v is contained in this set.
Data type for general directed graphs (adjacency list representation).
int size() const
Returns the number of nodes in this set.
const ListType & nodes() const
Returns a reference to the list of nodes contained in this set.
Dynamic arrays indexed with nodes.
typename std::conditional< SupportFastSizeQuery, List< node >, ListPure< node > >::type ListType
ListType m_nodes
The list of nodes contained in this set.
Class for the representation of nodes.
Declaration and implementation of NodeArray class.
Encapsulates a pointer to a list element.
NodeSet(const Graph &G)
Creates an empty node set associated with graph G.
NodeArray< ListIterator< node > > m_it
m_it[v] contains the list iterator pointing to v if v is contained in this set, or an invalid list it...
NodeSet & operator=(const NodeSet< OtherSupportsFastSizeQuery > &other)
Assignment operator.
void clear()
Removes all nodes from this set.
The namespace for all OGDF objects.
const Graph & graphOf() const
Returns the associated graph.
void insert(node v)
Inserts node v into this set.
NodeSet(const NodeSet< OtherSupportsFastSizeQuery > &other)
Copy constructor.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
Declaration of doubly linked lists and iterators.