|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
47 class CombinatorialEmbedding;
48 class ConstCombinatorialEmbedding;
81 m_head = m_tail =
nullptr;
89 int size()
const {
return m_size; }
92 bool empty()
const {
return m_size == 0; }
99 m_tail = m_tail->
m_next = pX;
101 m_tail = m_head = pX;
151 void sort(
const LIST& newOrder) {
165 for (
auto it =
begin; it !=
end; ++it) {
167 if ((p->
m_prev = pPred) !=
nullptr) {
172 (m_tail = pPred)->m_next =
nullptr;
195 }
else if (pY->
m_next == pX) {
235 void permute(RNG& rng) {
237 A[0] =
A[m_size + 1] =
nullptr;
241 for (pX = m_head; pX; pX = pX->
m_next) {
245 A.permute(1, m_size, rng);
247 for (i = 1; i <= m_size; i++) {
268 void consistencyCheck()
const {
270 OGDF_ASSERT((m_head ==
nullptr) == (m_tail ==
nullptr));
272 if (m_head !=
nullptr) {
316 OGDF_ALLOCATOR::deallocateList(
sizeof(T),
m_head,
m_tail);
378 OGDF_ALLOCATOR::deallocateList(
sizeof(T),
m_head,
m_tail);
409 template<
class GraphObject>
The namespace for all OGDF objects.
void del(T *pX)
Removes element pX from the list and deletes it.
void insertAfter(GraphElement *pX, GraphElement *pY)
Inserts element pX after element pY.
GraphElement * m_head
Pointer to the first element in the list.
void moveAfter(T *pX, T *pY)
Moves element pX from its current position to a position after pY.
void del(GraphElement *pX)
Removes element pX from the list.
T * tail() const
Returns the last element in the list.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
void consistencyCheck() const
Asserts consistency of this list.
void sort(const LIST &newOrder)
Sorts the list according to newOrder.
~GraphList()
Destruction: deletes all elements.
HypergraphRegistry< HypernodeElement >::iterator begin(const HypergraphRegistry< HypernodeElement > &self)
GraphElement * m_next
The successor in the list.
The base class for objects used by (hyper)graphs.
GraphListBase()
Constructs an empty list.
void swap(GraphElement *pX, GraphElement *pY)
Exchanges the positions of pX and pY in the list.
void permute()
Permutes all list elements.
Public read-only interface for lists of graph objects.
void delPure(T *pX)
Only removes element pX from the list; does not delete it.
GraphList()
Constructs an empty list.
reverse_iterator rbegin() const
Returns a reverse iterator to the last element in the container.
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
void moveBefore(T *pX, T *pY)
Moves element pX from its current position to a position before pY.
void move(T *pX, GraphList< T > &L, T *pY, Direction dir)
Moves element pX to list L and inserts it before or after pY.
int size() const
Returns the size of the list.
Reverse< T > reverse(T &container)
Provides iterators for container to make it easily iterable in reverse.
void pushBack(GraphElement *pX)
Adds element pX at the end of the list.
GraphElement * m_tail
Pointer to the last element in the list.
void reverse()
Reverses the order of the list elements.
void sort(T *array, int size, LessThan lt)
void insertBefore(GraphElement *pX, GraphElement *pY)
Inserts element pX before element pY.
The parameterized class Array implements dynamic arrays of type E.
void pushBack(T *pX)
Adds element pX at the end of the list.
void insertBefore(T *pX, T *pY)
Inserts element pX before element pY.
Base class for GraphElement lists.
Data type for general directed graphs (adjacency list representation).
Lists of graph objects (like nodes, edges, etc.).
void move(T *pX, GraphList< T > &L)
Moves element pX to list L and inserts it at the end.
int m_size
The size of the list.
GraphReverseIterator< T * > reverse_iterator
Provides a bidirectional reverse iterator to an object in the container.
Decralation of graph iterators.
reverse_iterator rend() const
Returns a reverse iterator to the one-before-first element in the container.
long unsigned int randomSeed()
Returns a random value suitable as initial seed for a random number engine.
GraphIterator< T * > iterator
Provides a bidirectional iterator to an object in the container.
Combinatorial embeddings of planar graphs.
iterator begin() const
Returns an iterator to the first element in the container.
T * head() const
Returns the first element in the list.
GraphElement * m_prev
The predecessor in the list.
Basic declarations, included by all source files.
HypergraphRegistry< HypernodeElement >::iterator end(const HypergraphRegistry< HypernodeElement > &self)
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
iterator end() const
Returns an iterator to the one-past-last element in the container.
Combinatorial embeddings of planar graphs with modification functionality.
Declaration and implementation of Array class and Array algorithms.
void clear()
Removes all elements from the list and deletes them.
bool empty() const
Returns true iff the list is empty.
void insertAfter(T *pX, T *pY)
Inserts element pX after element pY.
~GraphListBase()
Destruction.
Representation of clustered graphs.
Declaration of memory manager for allocating small pieces of memory.
void swap(T *pX, T *pY)
Exchanges the positions of pX and pY in the list.
Class for the representation of hypernodes.