|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
36 #include <type_traits>
54 template<
class Registry,
bool SupportFastSizeQuery = true>
58 using list_type =
typename std::conditional<SupportFastSizeQuery, List<element_type>,
74 void init(
const Registry& R) {
160 template<
bool OtherSupportsFastSizeQuery>
166 template<
bool OtherSupportsFastSizeQuery>
typename ConstCombinatorialEmbedding ::key_type element_type
The namespace for all OGDF objects.
const list_type & elements() const
Returns a reference to the list of elements contained in this set.
Dynamic arrays indexed with arbitrary keys.
list_type::const_iterator begin() const
list_type m_elements
The list of elements contained in this set.
bool valid() const
Returns true iff the iterator points to an element.
typename std::conditional< SupportFastSizeQuery, List< element_type >, ListPure< element_type > >::type list_type
int size() const
Returns the number of elements in this set.
void init(const Registry &R)
Reinitializes the set. Associates the set with registry R.
const Registry * registeredAt() const
Returns the associated registry.
list_type::const_iterator end() const
RegisteredArray< Registry, ListIterator< element_type >, false > m_it
m_it[v] contains the list iterator pointing to v if v is contained in this set, or an invalid list it...
void init()
Reinitializes the set. Associates the set with no registry.
void insert(element_type v)
Inserts element v into this set.
Declaration and implementation of RegisteredArray class.
bool remove(element_type v)
Removes element v from this set and return true iff v was previously present.
bool isMember(element_type v) const
Returns true iff element v is contained in this set.
void clear()
Removes all elements from this set.
Constant-time set operations.
RegisteredSet()
Creates an empty set associated with no registry.
bool operator()(element_type v) const
Returns the same as isMember() to use an RegisteredSet instance as filter function.
RegisteredSet(const RegisteredSet< Registry, OtherSupportsFastSizeQuery > &other)
Copy constructor.
RegisteredSet & operator=(const RegisteredSet< Registry, OtherSupportsFastSizeQuery > &other)
Assignment operator.
Declaration of doubly linked lists and iterators.
Encapsulates a pointer to a list element.
RegisteredSet(const Registry &R)
Creates an empty set associated with registry R.