Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::internal::GraphList< T > Class Template Reference

Lists of graph objects (like nodes, edges, etc.). More...

#include <ogdf/basic/GraphList.h>

+ Inheritance diagram for ogdf::internal::GraphList< T >:

Public Member Functions

 GraphList ()
 Constructs an empty list.
 
 ~GraphList ()
 Destruction: deletes all elements.
 
void clear ()
 Removes all elements from the list and deletes them.
 
void del (T *pX)
 Removes element pX from the list and deletes it.
 
void delPure (T *pX)
 Only removes element pX from the list; does not delete it.
 
bool empty () const
 Returns true iff the list is empty.
 
T * head () const
 Returns the first element in the list.
 
void insertAfter (T *pX, T *pY)
 Inserts element pX after element pY.
 
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 move (T *pX, GraphList< T > &L, T *pY, Direction dir)
 Moves element pX to list L and inserts it before or after pY.
 
void moveAfter (T *pX, T *pY)
 Moves element pX from its current position to a position after pY.
 
void moveBefore (T *pX, T *pY)
 Moves element pX from its current position to a position before pY.
 
void permute ()
 Permutes all list elements.
 
template<class RNG >
void permute (RNG &rng)
 Permutes all list elements.
 
void pushBack (T *pX)
 Adds element pX at the end of the list.
 
void reverse ()
 Reverses the order of the list elements.
 
int size () const
 Returns the size of the list.
 
template<class T_LIST >
void sort (const T_LIST &newOrder)
 Sorts all elements according to newOrder.
 
void swap (T *pX, T *pY)
 Exchanges the positions of pX and pY in the list.
 
T * tail () const
 Returns the last element in the list.
 

Additional Inherited Members

- Protected Member Functions inherited from ogdf::internal::GraphListBase
 GraphListBase ()
 Constructs an empty list.
 
 ~GraphListBase ()
 Destruction.
 
void del (GraphElement *pX)
 Removes element pX from the list.
 
void insertAfter (GraphElement *pX, GraphElement *pY)
 Inserts element pX after element pY.
 
void insertBefore (GraphElement *pX, GraphElement *pY)
 Inserts element pX before element pY.
 
void permute ()
 Permutes all list elements.
 
template<class RNG >
void permute (RNG &rng)
 Permutes all list elements.
 
void pushBack (GraphElement *pX)
 Adds element pX at the end of the list.
 
void reverse ()
 Reverses the order of the list elements.
 
int size () const
 Returns the size of the list.
 
template<class LIST >
void sort (const LIST &newOrder)
 Sorts the list according to newOrder.
 
void swap (GraphElement *pX, GraphElement *pY)
 Exchanges the positions of pX and pY in the list.
 
- Protected Attributes inherited from ogdf::internal::GraphListBase
GraphElementm_head
 Pointer to the first element in the list.
 
int m_size
 The size of the list.
 
GraphElementm_tail
 Pointer to the last element in the list.
 

Detailed Description

template<class T>
class ogdf::internal::GraphList< T >

Lists of graph objects (like nodes, edges, etc.).

The template type T must be a class derived from GraphElement.

Definition at line 288 of file GraphList.h.

Constructor & Destructor Documentation

◆ GraphList()

template<class T >
ogdf::internal::GraphList< T >::GraphList ( )
inline

Constructs an empty list.

Definition at line 291 of file GraphList.h.

◆ ~GraphList()

template<class T >
ogdf::internal::GraphList< T >::~GraphList ( )
inline

Destruction: deletes all elements.

Definition at line 294 of file GraphList.h.

Member Function Documentation

◆ clear()

template<class T >
void ogdf::internal::GraphList< T >::clear ( )
inline

Removes all elements from the list and deletes them.

Definition at line 359 of file GraphList.h.

◆ del()

template<class T >
void ogdf::internal::GraphList< T >::del ( T *  pX)
inline

Removes element pX from the list and deletes it.

Definition at line 350 of file GraphList.h.

◆ delPure()

template<class T >
void ogdf::internal::GraphList< T >::delPure ( T *  pX)
inline

Only removes element pX from the list; does not delete it.

Definition at line 356 of file GraphList.h.

◆ empty()

template<class T >
bool ogdf::internal::GraphList< T >::empty ( ) const
inline

Returns true iff the list is empty.

Definition at line 310 of file GraphList.h.

◆ head()

template<class T >
T * ogdf::internal::GraphList< T >::head ( ) const
inline

Returns the first element in the list.

Definition at line 304 of file GraphList.h.

◆ insertAfter()

template<class T >
void ogdf::internal::GraphList< T >::insertAfter ( T *  pX,
T *  pY 
)
inline

Inserts element pX after element pY.

Definition at line 316 of file GraphList.h.

◆ insertBefore()

template<class T >
void ogdf::internal::GraphList< T >::insertBefore ( T *  pX,
T *  pY 
)
inline

Inserts element pX before element pY.

Definition at line 319 of file GraphList.h.

◆ move() [1/2]

template<class T >
void ogdf::internal::GraphList< T >::move ( T *  pX,
GraphList< T > &  L 
)
inline

Moves element pX to list L and inserts it at the end.

Definition at line 332 of file GraphList.h.

◆ move() [2/2]

template<class T >
void ogdf::internal::GraphList< T >::move ( T *  pX,
GraphList< T > &  L,
T *  pY,
Direction  dir 
)
inline

Moves element pX to list L and inserts it before or after pY.

Definition at line 322 of file GraphList.h.

◆ moveAfter()

template<class T >
void ogdf::internal::GraphList< T >::moveAfter ( T *  pX,
T *  pY 
)
inline

Moves element pX from its current position to a position after pY.

Definition at line 338 of file GraphList.h.

◆ moveBefore()

template<class T >
void ogdf::internal::GraphList< T >::moveBefore ( T *  pX,
T *  pY 
)
inline

Moves element pX from its current position to a position before pY.

Definition at line 344 of file GraphList.h.

◆ permute() [1/2]

template<class T >
void ogdf::internal::GraphListBase::permute ( )
inline

Permutes all list elements.

Definition at line 249 of file GraphList.h.

◆ permute() [2/2]

template<class T >
template<class RNG >
void ogdf::internal::GraphListBase::permute ( RNG rng)
inline

Permutes all list elements.

Definition at line 222 of file GraphList.h.

◆ pushBack()

template<class T >
void ogdf::internal::GraphList< T >::pushBack ( T *  pX)
inline

Adds element pX at the end of the list.

Definition at line 313 of file GraphList.h.

◆ reverse()

template<class T >
void ogdf::internal::GraphList< T >::reverse ( )
inline

Reverses the order of the list elements.

Definition at line 374 of file GraphList.h.

◆ size()

template<class T >
int ogdf::internal::GraphList< T >::size ( ) const
inline

Returns the size of the list.

Definition at line 301 of file GraphList.h.

◆ sort()

template<class T >
template<class T_LIST >
void ogdf::internal::GraphList< T >::sort ( const T_LIST newOrder)
inline

Sorts all elements according to newOrder.

Definition at line 369 of file GraphList.h.

◆ swap()

template<class T >
void ogdf::internal::GraphList< T >::swap ( T *  pX,
T *  pY 
)
inline

Exchanges the positions of pX and pY in the list.

Definition at line 377 of file GraphList.h.

◆ tail()

template<class T >
T * ogdf::internal::GraphList< T >::tail ( ) const
inline

Returns the last element in the list.

Definition at line 307 of file GraphList.h.


The documentation for this class was generated from the following file: