Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

ogdf::AdjEntrySet< SupportFastSizeQuery > Class Template Reference

AdjEntry sets. More...

#include <ogdf/basic/GraphSets.h>

+ Inheritance diagram for ogdf::AdjEntrySet< SupportFastSizeQuery >:

Public Member Functions

 AdjEntrySet ()=default
 Creates an empty adjEntry set associated with no graph. More...
 
 AdjEntrySet (const Graph &graph)
 Creates a new adjEntry set associated with graph. More...
 
const RS::list_typeadjEntries ()
 Returns a reference to the list of adjEntries contained in this set. More...
 
const GraphgraphOf () const
 Returns the associated graph. More...
 
- Public Member Functions inherited from ogdf::RegisteredSet< internal::GraphAdjRegistry, true >
 RegisteredSet ()
 Creates an empty set associated with no registry. More...
 
 RegisteredSet (const internal::GraphAdjRegistry &R)
 Creates an empty set associated with registry R. More...
 
 RegisteredSet (const RegisteredSet< internal::GraphAdjRegistry, OtherSupportsFastSizeQuery > &other)
 Copy constructor. More...
 
list_type::const_iterator begin () const
 
void clear ()
 Removes all elements from this set. More...
 
const list_typeelements () 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::GraphAdjRegistry &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...
 
RegisteredSetoperator= (const RegisteredSet< internal::GraphAdjRegistry, OtherSupportsFastSizeQuery > &other)
 Assignment operator. More...
 
const internal::GraphAdjRegistryregisteredAt () 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::GraphAdjRegistry, SupportFastSizeQuery >
 

Additional Inherited Members

- Public Types inherited from ogdf::RegisteredSet< internal::GraphAdjRegistry, true >
using element_type = typename internal::GraphAdjRegistry ::key_type
 
using list_type = typename std::conditional< SupportFastSizeQuery, List< element_type >, ListPure< element_type > >::type
 

Detailed Description

template<bool SupportFastSizeQuery = true>
class ogdf::AdjEntrySet< SupportFastSizeQuery >

AdjEntry sets.

Maintains a subset of adjEntries contained in an associated graph.

Provides efficient operations for testing membership, iteration, insertion, and deletion of elements, as well as clearing the set.

Template Parameters
SupportFastSizeQueryWhether this set supports querying it's size in constant instead of linear time (in the size).

Definition at line 122 of file GraphSets.h.

Member Typedef Documentation

◆ RS

template<bool SupportFastSizeQuery = true>
using ogdf::AdjEntrySet< SupportFastSizeQuery >::RS = RegisteredSet<internal::GraphAdjRegistry, SupportFastSizeQuery>
private

Definition at line 123 of file GraphSets.h.

Constructor & Destructor Documentation

◆ AdjEntrySet() [1/2]

template<bool SupportFastSizeQuery = true>
ogdf::AdjEntrySet< SupportFastSizeQuery >::AdjEntrySet ( const Graph graph)
inlineexplicit

Creates a new adjEntry set associated with graph.

Definition at line 129 of file GraphSets.h.

◆ AdjEntrySet() [2/2]

template<bool SupportFastSizeQuery = true>
ogdf::AdjEntrySet< SupportFastSizeQuery >::AdjEntrySet ( )
explicitdefault

Creates an empty adjEntry set associated with no graph.

Member Function Documentation

◆ adjEntries()

template<bool SupportFastSizeQuery = true>
const RS::list_type& ogdf::AdjEntrySet< SupportFastSizeQuery >::adjEntries ( )
inline

Returns a reference to the list of adjEntries contained in this set.

Definition at line 135 of file GraphSets.h.

◆ graphOf()

template<bool SupportFastSizeQuery = true>
const Graph& ogdf::AdjEntrySet< SupportFastSizeQuery >::graphOf ( ) const
inline

Returns the associated graph.

Definition at line 138 of file GraphSets.h.


The documentation for this class was generated from the following file: