69 base.m_pGraph =
nullptr;
94 m_it =
pG->registerArray(
this);
105 base.m_pGraph =
nullptr;
205 OGDF_DEPRECATED(
"NodeArrays should be indexed by a node, not an integer index.")
211 OGDF_DEPRECATED(
"NodeArrays should be indexed by a node, not an integer index.")
Pure declaration header, find template implementation in Graph.h.
The parameterized class Array implements dynamic arrays of type E.
const_reference operator[](INDEX i) const
Returns a reference to the element at position i.
void resize(INDEX newSize, const E &x)
Resizes (enlarges or shrinks) the array to hold newSize elements and sets new elements to x.
INDEX high() const
Returns the maximal array index.
void init()
Reinitializes the array to an array with empty index set.
void fill(const E &x)
Sets all elements to x.
Array< E, INDEX > & operator=(const Array< E, INDEX > &A)
Assignment operator.
INDEX low() const
Returns the minimal array index.
Data type for general directed graphs (adjacency list representation).
int maxNodeIndex() const
Returns the largest used node index.
ListIterator< NodeArrayBase * > registerArray(NodeArrayBase *pNodeArray) const
Registers a node array.
void moveRegisterArray(ListIterator< ArrayBase * > it, ArrayBase *pArray) const
Move the registration it of an graph element array to pArray (used with move semantics for graph elem...
node firstNode() const
Returns the first node in the list of all nodes.
void unregisterArray(ListIterator< NodeArrayBase * > it) const
Unregisters a node array.
Encapsulates a pointer to a list element.
Abstract base class for node arrays.
const Graph * m_pGraph
The associated graph.
virtual void reinit(int initTableSize)=0
Virtual function called when table has to be reinitialized.
NodeArrayBase()
Initializes an node array not associated with a graph.
virtual void disconnect()=0
Virtual function called when array is disconnected from the graph.
ListIterator< NodeArrayBase * > m_it
Pointer to list element in the list of all registered node arrays which references this array.
void moveRegister(NodeArrayBase &base)
Moves array registration from base to this array.
void reregister(const Graph *pG)
Associates the array with a new graph.
NodeArrayBase(NodeArrayBase &base)
Moves node array base to this node array.
virtual void enlargeTable(int newTableSize)=0
Virtual function called when table size has to be enlarged.
NodeArrayBase(const Graph *pG)
Initializes an node array associated with pG.
Dynamic arrays indexed with nodes.
static key_type findSuccKey(key_type key)
internal::GraphArrayConstIterator< NodeArray< T > > const_iterator
The type for node array const iterators.
NodeArray(const Graph &G)
Constructs a node array associated with G.
const Graph * graphOf() const
Returns a pointer to the associated graph.
NodeArray< T > & operator=(NodeArray< T > &&a)
Assignment operator (move semantics).
virtual void enlargeTable(int newTableSize)
Virtual function called when table size has to be enlarged.
NodeArray(const NodeArray< T > &A)
Constructs a node array that is a copy of A.
NodeArray(const Graph &G, const T &x)
Constructs a node array associated with G.
T m_x
The default value for array elements.
void init(const Graph &G, const T &x)
Reinitializes the array. Associates the array with G.
NodeArray()
Constructs an empty node array associated with no graph.
virtual void disconnect()
Virtual function called when array is disconnected from the graph.
void fill(const T &x)
Sets all array elements to x.
void init(const Graph &G)
Reinitializes the array. Associates the array with G.
virtual void reinit(int initTableSize)
Virtual function called when table has to be reinitialized.
iterator end()
Returns an iterator to one-past-last entry in the node array.
NodeArray< T > & operator=(const NodeArray< T > &a)
Assignment operator.
const T & operator[](node v) const
Returns a reference to the element with index v.
T & operator()(node v)
Returns a reference to the element with index v.
bool valid() const
Returns true iff the array is associated with a graph.
static key_type findPredKey(key_type key)
T & operator[](node v)
Returns a reference to the element with index v.
NodeArray(NodeArray< T > &&A)
Constructs a node array containing the elements of A (move semantics).
const T & operator()(node v) const
Returns a reference to the element with index v.
iterator begin()
Returns an iterator to the first entry in the node array.
const_iterator cbegin() const
Returns a const iterator to the first entry in the node array.
internal::GraphArrayIterator< NodeArray< T > > iterator
The type for node array iterators.
const_iterator begin() const
Returns a const iterator to the first entry in the node array.
const_iterator end() const
Returns a const iterator to one-past-last entry in the node array.
T value_type
The type for array entries.
void init()
Reinitializes the array. Associates the array with no graph.
const_iterator cend() const
Returns a const iterator to one-past-last entry in the node array.
Class for the representation of nodes.
node succ() const
Returns the successor in the list of all nodes.
int index() const
Returns the (unique) node index.
node pred() const
Returns the predecessor in the list of all nodes.
NodeElement * node
The type of nodes.
#define OGDF_DEPRECATED(reason)
Mark a class / member / function as deprecated.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.