Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

ogdf::AdjElement Class Reference

Class for adjacency list elements. More...

#include <ogdf/basic/Graph_d.h>

+ Inheritance diagram for ogdf::AdjElement:

Public Member Functions

adjEntry clockwiseFacePred () const
 Returns the clockwise predecessor in face. Use faceCycleSucc instead! More...
 
adjEntry clockwiseFaceSucc () const
 Returns the clockwise successor in face. Use faceCycleSucc instead! More...
 
adjEntry counterClockwiseFacePred () const
 Returns the counter-clockwise predecessor in face. More...
 
adjEntry counterClockwiseFaceSucc () const
 Returns the counter-clockwise successor in face. More...
 
adjEntry cyclicPred () const
 Returns the cyclic predecessor in the adjacency list. More...
 
adjEntry cyclicSucc () const
 Returns the cyclic successor in the adjacency list. More...
 
adjEntry faceCyclePred () const
 Returns the cyclic predecessor in face. More...
 
adjEntry faceCycleSucc () const
 Returns the cyclic successor in face. More...
 
int index () const
 Returns the index of this adjacency element. More...
 
bool isBetween (adjEntry adjBefore, adjEntry adjAfter) const
 Returns whether this adjacency entry lies between adjBefore and adjAfter in clockwise rotation. More...
 
bool isSource () const
 Returns true iff this is the source adjacency entry of the corresponding edge. More...
 
 operator edge () const
 Conversion to edge. More...
 
 operator node () const
 Casts to the node whose adjacency list contains this element. More...
 
adjEntry pred () const
 Returns the predecessor in the adjacency list. More...
 
adjEntry succ () const
 Returns the successor in the adjacency list. More...
 
edge theEdge () const
 Returns the edge associated with this adjacency entry. More...
 
node theNode () const
 Returns the node whose adjacency list contains this element. More...
 
adjEntry twin () const
 Returns the corresponding adjacency element associated with the same edge. More...
 
node twinNode () const
 Returns the associated node of the corresponding adjacency entry (shorthand for twin()->theNode()). More...
 

Static Public Member Functions

static int compare (const AdjElement &x, const AdjElement &y)
 Standard Comparer. More...
 

Private Member Functions

 AdjElement (edge e, int id)
 Constructs an adjacency entry for a given edge and index. More...
 
 AdjElement (node v)
 Constructs an adjacency element for a given node. More...
 

Private Attributes

edge m_edge
 The associated edge. More...
 
int m_id
 The (unique) index of the adjacency entry. More...
 
node m_node
 The node whose adjacency list contains this entry. More...
 
AdjElementm_twin
 The corresponding adjacency entry (same edge) More...
 
- Private Attributes inherited from ogdf::internal::GraphElement
GraphElementm_next = nullptr
 The successor in the list. More...
 
GraphElementm_prev = nullptr
 The predecessor in the list. More...
 

Friends

class Graph
 
class internal::GraphList< AdjElement >
 
class internal::GraphListBase
 

Detailed Description

Class for adjacency list elements.

Adjacency list elements represent the occurrence of an edges in the adjacency list of a node.

Definition at line 79 of file Graph_d.h.

Constructor & Destructor Documentation

◆ AdjElement() [1/2]

ogdf::AdjElement::AdjElement ( node  v)
inlineexplicitprivate

Constructs an adjacency element for a given node.

Definition at line 90 of file Graph_d.h.

◆ AdjElement() [2/2]

ogdf::AdjElement::AdjElement ( edge  e,
int  id 
)
inlineprivate

Constructs an adjacency entry for a given edge and index.

Definition at line 92 of file Graph_d.h.

Member Function Documentation

◆ clockwiseFacePred()

adjEntry ogdf::AdjElement::clockwiseFacePred ( ) const
inline

Returns the clockwise predecessor in face. Use faceCycleSucc instead!

Definition at line 134 of file Graph_d.h.

◆ clockwiseFaceSucc()

adjEntry ogdf::AdjElement::clockwiseFaceSucc ( ) const
inline

Returns the clockwise successor in face. Use faceCycleSucc instead!

Definition at line 132 of file Graph_d.h.

◆ compare()

static int ogdf::AdjElement::compare ( const AdjElement x,
const AdjElement y 
)
inlinestatic

Standard Comparer.

Definition at line 162 of file Graph_d.h.

◆ counterClockwiseFacePred()

adjEntry ogdf::AdjElement::counterClockwiseFacePred ( ) const
inline

Returns the counter-clockwise predecessor in face.

Definition at line 138 of file Graph_d.h.

◆ counterClockwiseFaceSucc()

adjEntry ogdf::AdjElement::counterClockwiseFaceSucc ( ) const
inline

Returns the counter-clockwise successor in face.

Definition at line 136 of file Graph_d.h.

◆ cyclicPred()

adjEntry ogdf::AdjElement::cyclicPred ( ) const
inline

Returns the cyclic predecessor in the adjacency list.

Definition at line 284 of file Graph_d.h.

◆ cyclicSucc()

adjEntry ogdf::AdjElement::cyclicSucc ( ) const
inline

Returns the cyclic successor in the adjacency list.

Definition at line 279 of file Graph_d.h.

◆ faceCyclePred()

adjEntry ogdf::AdjElement::faceCyclePred ( ) const
inline

Returns the cyclic predecessor in face.

Definition at line 144 of file Graph_d.h.

◆ faceCycleSucc()

adjEntry ogdf::AdjElement::faceCycleSucc ( ) const
inline

Returns the cyclic successor in face.

Definition at line 142 of file Graph_d.h.

◆ index()

int ogdf::AdjElement::index ( ) const
inline

Returns the index of this adjacency element.

Definition at line 111 of file Graph_d.h.

◆ isBetween()

bool ogdf::AdjElement::isBetween ( adjEntry  adjBefore,
adjEntry  adjAfter 
) const
inline

Returns whether this adjacency entry lies between adjBefore and adjAfter in clockwise rotation.

Note that this operation takes time linear in the degree of the node.

Parameters
adjBeforeFirst adjacency entry. Must be at the same node as this.
adjAfterLast adjacency entry. Must be at the same node as this.
Returns
true iff this adjacency entry is in between

Definition at line 403 of file Graph_d.h.

◆ isSource()

bool ogdf::AdjElement::isSource ( ) const
inline

Returns true iff this is the source adjacency entry of the corresponding edge.

Definition at line 399 of file Graph_d.h.

◆ operator edge()

ogdf::AdjElement::operator edge ( ) const
inline

Conversion to edge.

Definition at line 98 of file Graph_d.h.

◆ operator node()

ogdf::AdjElement::operator node ( ) const
inline

Casts to the node whose adjacency list contains this element.

Definition at line 102 of file Graph_d.h.

◆ pred()

adjEntry ogdf::AdjElement::pred ( ) const
inline

Returns the predecessor in the adjacency list.

Definition at line 150 of file Graph_d.h.

◆ succ()

adjEntry ogdf::AdjElement::succ ( ) const
inline

Returns the successor in the adjacency list.

Definition at line 148 of file Graph_d.h.

◆ theEdge()

edge ogdf::AdjElement::theEdge ( ) const
inline

Returns the edge associated with this adjacency entry.

Definition at line 96 of file Graph_d.h.

◆ theNode()

node ogdf::AdjElement::theNode ( ) const
inline

Returns the node whose adjacency list contains this element.

Definition at line 100 of file Graph_d.h.

◆ twin()

adjEntry ogdf::AdjElement::twin ( ) const
inline

Returns the corresponding adjacency element associated with the same edge.

Definition at line 105 of file Graph_d.h.

◆ twinNode()

node ogdf::AdjElement::twinNode ( ) const
inline

Returns the associated node of the corresponding adjacency entry (shorthand for twin()->theNode()).

Definition at line 108 of file Graph_d.h.

Friends And Related Function Documentation

◆ Graph

friend class Graph
friend

Definition at line 80 of file Graph_d.h.

◆ internal::GraphList< AdjElement >

friend class internal::GraphList< AdjElement >
friend

Definition at line 82 of file Graph_d.h.

◆ internal::GraphListBase

friend class internal::GraphListBase
friend

Definition at line 81 of file Graph_d.h.

Member Data Documentation

◆ m_edge

edge ogdf::AdjElement::m_edge
private

The associated edge.

Definition at line 85 of file Graph_d.h.

◆ m_id

int ogdf::AdjElement::m_id
private

The (unique) index of the adjacency entry.

Definition at line 87 of file Graph_d.h.

◆ m_node

node ogdf::AdjElement::m_node
private

The node whose adjacency list contains this entry.

Definition at line 86 of file Graph_d.h.

◆ m_twin

AdjElement* ogdf::AdjElement::m_twin
private

The corresponding adjacency entry (same edge)

Definition at line 84 of file Graph_d.h.


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