42class ConstCombinatorialEmbedding;
43class CombinatorialEmbedding;
76 m_head = m_tail =
nullptr;
84 int size()
const {
return m_size; }
145 typename LIST::const_iterator it = newOrder.begin();
151 for (; it.valid(); ++it) {
153 if ((p->
m_prev = pPred) !=
nullptr) {
159 (m_tail = pPred)->m_next =
nullptr;
176 if (
pX->m_next ==
pY) {
177 pX->m_next =
pY->m_next;
178 pY->m_prev =
pX->m_prev;
182 }
else if (
pY->m_next ==
pX) {
183 pY->m_next =
pX->m_next;
184 pX->m_prev =
pY->m_prev;
189 std::swap(
pX->m_next,
pY->m_next);
190 std::swap(
pX->m_prev,
pY->m_prev);
194 pX->m_prev->m_next =
pX;
224 A[0] =
A[m_size + 1] =
nullptr;
232 A.permute(1, m_size,
rng);
234 for (i = 1; i <= m_size; i++) {
236 pX->m_next =
A[i + 1];
237 pX->m_prev =
A[i - 1];
257 OGDF_ASSERT((m_head ==
nullptr) == (m_tail ==
nullptr));
259 if (m_head !=
nullptr) {
296 OGDF_ALLOCATOR::deallocateList(
sizeof(T),
m_head,
m_tail);
325 L.insertAfter(
pX,
pY);
327 L.insertBefore(
pX,
pY);
361 OGDF_ALLOCATOR::deallocateList(
sizeof(T),
m_head,
m_tail);
368 template<
class T_LIST>
381 using GraphListBase::consistencyCheck;
387template<
class GraphObject>
Declaration and implementation of Array class and Array algorithms.
Declaration of doubly linked lists and iterators.
The parameterized class Array implements dynamic arrays of type E.
Representation of clustered graphs.
Combinatorial embeddings of planar graphs with modification functionality.
Combinatorial embeddings of planar graphs.
Data type for general directed graphs (adjacency list representation).
The base class for objects used by (hyper)graphs.
GraphElement * m_next
The successor in the list.
GraphElement * m_prev
The predecessor in the list.
Base class for GraphElement lists.
void pushBack(GraphElement *pX)
Adds element pX at the end of the list.
int m_size
The size of the list.
void insertAfter(GraphElement *pX, GraphElement *pY)
Inserts element pX after element pY.
GraphListBase()
Constructs an empty list.
void insertBefore(GraphElement *pX, GraphElement *pY)
Inserts element pX before element pY.
~GraphListBase()
Destruction.
void sort(const LIST &newOrder)
Sorts the list according to newOrder.
GraphElement * m_head
Pointer to the first element in the list.
int size() const
Returns the size of the list.
void reverse()
Reverses the order of the list elements.
void del(GraphElement *pX)
Removes element pX from the list.
void permute()
Permutes all list elements.
GraphElement * m_tail
Pointer to the last element in the list.
void permute(RNG &rng)
Permutes all list elements.
void swap(GraphElement *pX, GraphElement *pY)
Exchanges the positions of pX and pY in the list.
Lists of graph objects (like nodes, edges, etc.).
T * head() const
Returns the first element in the list.
void move(T *pX, GraphList< T > &L, T *pY, Direction dir)
Moves element pX to list L and inserts it before or after pY.
void sort(const T_LIST &newOrder)
Sorts all elements according to newOrder.
bool empty() const
Returns true iff the list is empty.
~GraphList()
Destruction: deletes all elements.
void delPure(T *pX)
Only removes element pX from the list; does not delete it.
T * tail() const
Returns the last element in the list.
void del(T *pX)
Removes element pX from the list and deletes it.
void clear()
Removes all elements from the list and deletes them.
void insertBefore(T *pX, T *pY)
Inserts element pX before element pY.
void move(T *pX, GraphList< T > &L)
Moves element pX to list L and inserts it at the end.
void pushBack(T *pX)
Adds element pX at the end of the list.
int size() const
Returns the size of the list.
void insertAfter(T *pX, T *pY)
Inserts element pX after element pY.
void moveBefore(T *pX, T *pY)
Moves element pX from its current position to a position before pY.
GraphList()
Constructs an empty list.
void moveAfter(T *pX, T *pY)
Moves element pX from its current position to a position after pY.
void swap(T *pX, T *pY)
Exchanges the positions of pX and pY in the list.
void permute()
Permutes all list elements.
void reverse()
Reverses the order of the list elements.
GraphIterator< GraphObject * > iterator
Provides a bidirectional iterator to an object in the container.
GraphReverseIterator< GraphObject * > reverse_iterator
Provides a bidirectional reverse iterator to an object in the container.
reverse_iterator rbegin() const
Returns a reverse iterator to the last element in the container.
GraphObject * value_type
The value type (a pointer to a specific graph object)
iterator end() const
Returns an iterator to the one-past-last element in the container.
iterator begin() const
Returns an iterator to the first element in the container.
reverse_iterator rend() const
Returns a reverse iterator to the one-before-first element in the container.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Decralation of graph iterators.
#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.
long unsigned int randomSeed()
Returns a random value suitable as initial seed for a random number engine.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.