81 virtual void reinit(
int initTableSize) = 0;
86 if ((m_pEmbedding = pE) !=
nullptr) m_it = pE->
registerArray(
this);
96 if (m_pEmbedding !=
nullptr)
face lastFace() const
Returns the last face in the list of all faces.
const_iterator end() const
Returns a const iterator to one-past-last entry in the face array.
The parameterized class Array implements dynamic arrays of type E.
static key_type findSuccKey(key_type key)
void init()
Reinitializes the array. Associates the array with no combinatorial embedding.
void fill(const T &x)
Sets all array elements to x.
FaceArrayBase()
Initializes a face array not associated with a combinatorial embedding.
void init()
Reinitializes the array to an array with empty index set.
void init(const ConstCombinatorialEmbedding &E)
Reinitializes the array. Associates the array with E.
void moveRegister(FaceArrayBase &base)
Moves array registration from base to this array.
const_iterator cend() const
Returns a const iterator to one-past-last entry in the face array.
INDEX high() const
Returns the maximal array index.
Combinatorial embeddings of planar graphs.
const T & operator[](face f) const
Returns a reference to the element with index f.
face pred() const
Returns the predecessor in the list of all faces.
FaceArray(const ConstCombinatorialEmbedding &E, const T &x)
Constructs a face array associated with E.
const_iterator crend() const
Returns a const iterator to one-before-first entry in the face array.
void init(const ConstCombinatorialEmbedding &E, const T &x)
Reinitializes the array. Associates the array with E.
Declaration of CombinatorialEmbedding and face.
const T & operator()(face f) const
Returns a reference to the element with index f.
bool * iterator
Provides a random-access iterator that can read or modify any element in an array.
const bool * const_iterator
Provides a random-access iterator that can read a const element in an array.
ListIterator< FaceArrayBase * > registerArray(FaceArrayBase *pFaceArray) const
Registers the face array pFaceArray.
FaceArray(const FaceArray< T > &A)
Constructs an face array that is a copy of A.
Declaration and implementation of Array class and Array algorithms.
bool valid() const
Returns true iff the array is associated with a combinatorial embedding.
virtual void enlargeTable(int newTableSize)=0
Virtual function called when table size has to be enlarged.
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)...
const_iterator crbegin() const
Returns a const iterator to the last entry in the face array.
const_iterator rbegin() const
Returns a const iterator to the last entry in the face array.
Dynamic arrays indexed with faces of a combinatorial embedding.
bool value_type
Represents the data type stored in an array element.
T & operator()(face f)
Returns a reference to the element with index f.
T m_x
The default value for array elements.
const_iterator rend() const
Returns a const iterator to one-before-first entry in the face array.
void reregister(const ConstCombinatorialEmbedding *pE)
Associates the array with a new combinatorial embedding.
int faceArrayTableSize() const
Returns the table size of face arrays associated with this embedding.
Faces in a combinatorial embedding.
const ConstCombinatorialEmbedding * embeddingOf() const
Returns a pointer to the associated combinatorial embedding.
FaceArray< T > & operator=(FaceArray< T > &&a)
Assignment operator (move semantics).
Encapsulates a pointer to a list element.
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
FaceArray(FaceArray< T > &&A)
Constructs a face array containing the elements of A (move semantics).
const T & move(const T &v)
virtual void reinit(int initTableSize)
Virtual function called when table has to be reinitialized.
FaceArray()
Constructs an empty face array associated with no combinatorial embedding.
void unregisterArray(ListIterator< FaceArrayBase *> it) const
Unregisters the face array identified by it.
static key_type findPredKey(key_type key)
iterator rend()
Returns an iterator to one-before-first entry in the face array.
void resize(INDEX newSize, const E &x)
Resizes (enlarges or shrinks) the array to hold newSize elements and sets new elements to x...
FaceArrayBase(FaceArrayBase &base)
Moves face array base to this face array.
const_iterator cbegin() const
Returns a const iterator to the first entry in the face array.
iterator rbegin()
Returns an iterator to the last entry in the face array.
ListIterator< FaceArrayBase * > m_it
Pointer to list element in the list of all registered face arrays which references this array...
T & operator[](face f)
Returns a reference to the element with index f.
FaceArray(const ConstCombinatorialEmbedding &E)
Constructs a face array associated with E.
virtual void reinit(int initTableSize)=0
Virtual function called when table has to be reinitialized.
Array< E, INDEX > & operator=(const Array< E, INDEX > &A)
Assignment operator.
const_reference operator[](INDEX i) const
Returns a reference to the element at position i.
const ConstCombinatorialEmbedding * m_pEmbedding
The associated combinatorial embedding.
void fill(const E &x)
Sets all elements to x.
int index() const
Returns the index of the face.
The namespace for all OGDF objects.
virtual void enlargeTable(int newTableSize)
Virtual function called when table size has to be enlarged.
const_iterator begin() const
Returns a const iterator to the first entry in the face array.
int maxFaceIndex() const
Returns the largest used face index.
face firstFace() const
Returns the first face in the list of all faces.
INDEX low() const
Returns the minimal array index.
FaceArray< T > & operator=(const FaceArray< T > &a)
Assignment operator.
FaceArrayBase(const ConstCombinatorialEmbedding *pE)
Initializes a face array associated with pE.
face succ() const
Returns the successor in the list of all faces.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
iterator begin()
Returns an iterator to the first entry in the face array.
iterator end()
Returns an iterator to one-past-last entry in the face array.
Abstract base class for face arrays.