71 base.m_pEmbedding =
nullptr;
94 m_it =
pE->registerArray(
this);
105 base.m_pEmbedding =
nullptr;
Declaration and implementation of Array class and Array algorithms.
Declaration of CombinatorialEmbedding and face.
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.
Combinatorial embeddings of planar graphs.
face firstFace() const
Returns the first face in the list of all faces.
int faceArrayTableSize() const
Returns the table size of face arrays associated with this embedding.
void moveRegisterArray(ListIterator< FaceArrayBase * > it, FaceArrayBase *pFaceArray) const
Move the registration it of a node array to pFaceArray (used with move semantics for face arrays).
ListIterator< FaceArrayBase * > registerArray(FaceArrayBase *pFaceArray) const
Registers the face array pFaceArray.
int maxFaceIndex() const
Returns the largest used face index.
void unregisterArray(ListIterator< FaceArrayBase * > it) const
Unregisters the face array identified by it.
Abstract base class for face arrays.
virtual void reinit(int initTableSize)=0
Virtual function called when table has to be reinitialized.
virtual void enlargeTable(int newTableSize)=0
Virtual function called when table size has to be enlarged.
void moveRegister(FaceArrayBase &base)
Moves array registration from base to this array.
ListIterator< FaceArrayBase * > m_it
Pointer to list element in the list of all registered face arrays which references this array.
FaceArrayBase(const ConstCombinatorialEmbedding *pE)
Initializes a face array associated with pE.
FaceArrayBase(FaceArrayBase &base)
Moves face array base to this face array.
const ConstCombinatorialEmbedding * m_pEmbedding
The associated combinatorial embedding.
FaceArrayBase()
Initializes a face array not associated with a combinatorial embedding.
void reregister(const ConstCombinatorialEmbedding *pE)
Associates the array with a new combinatorial embedding.
Dynamic arrays indexed with faces of a combinatorial embedding.
FaceArray(const FaceArray< T > &A)
Constructs an face array that is a copy of A.
T & operator[](face f)
Returns a reference to the element with index f.
virtual void enlargeTable(int newTableSize)
Virtual function called when table size has to be enlarged.
FaceArray(const ConstCombinatorialEmbedding &E, const T &x)
Constructs a face array associated with E.
const_iterator begin() const
Returns a const iterator to the first entry in the face array.
FaceArray(FaceArray< T > &&A)
Constructs a face array containing the elements of A (move semantics).
FaceArray< T > & operator=(const FaceArray< T > &a)
Assignment operator.
void init(const ConstCombinatorialEmbedding &E, const T &x)
Reinitializes the array. Associates the array with E.
const ConstCombinatorialEmbedding * embeddingOf() const
Returns a pointer to the associated combinatorial embedding.
const T & operator()(face f) const
Returns a reference to the element with index f.
static key_type findPredKey(key_type key)
bool valid() const
Returns true iff the array is associated with a combinatorial embedding.
void init(const ConstCombinatorialEmbedding &E)
Reinitializes the array. Associates the array with E.
iterator end()
Returns an iterator to one-past-last entry in the face array.
internal::GraphArrayConstIterator< FaceArray< T > > const_iterator
The type for face array const iterators.
iterator begin()
Returns an iterator to the first entry in the face array.
const T & operator[](face f) const
Returns a reference to the element with index f.
internal::GraphArrayIterator< FaceArray< T > > iterator
The type for face array iterators.
T value_type
The type for array entries.
FaceArray(const ConstCombinatorialEmbedding &E)
Constructs a face array associated with E.
const_iterator end() const
Returns a const iterator to one-past-last entry in the face array.
virtual void reinit(int initTableSize)
Virtual function called when table has to be reinitialized.
const_iterator cend() const
Returns a const iterator to one-past-last entry in the face array.
FaceArray()
Constructs an empty face array associated with no combinatorial embedding.
FaceArray< T > & operator=(FaceArray< T > &&a)
Assignment operator (move semantics).
static key_type findSuccKey(key_type key)
void init()
Reinitializes the array. Associates the array with no combinatorial embedding.
T & operator()(face f)
Returns a reference to the element with index f.
T m_x
The default value for array elements.
void fill(const T &x)
Sets all array elements to x.
const_iterator cbegin() const
Returns a const iterator to the first entry in the face array.
Faces in a combinatorial embedding.
face pred() const
Returns the predecessor in the list of all faces.
face succ() const
Returns the successor in the list of all faces.
Encapsulates a pointer to a list element.
#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.