Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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

Static Public Member Functions

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

Private Member Functions

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

Private Attributes

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

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 93 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 139 of file Graph_d.h.

◆ clockwiseFaceSucc()

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

Returns the clockwise successor in face. Use faceCycleSucc instead!

Definition at line 136 of file Graph_d.h.

◆ compare()

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

Standard Comparer.

Definition at line 170 of file Graph_d.h.

◆ counterClockwiseFacePred()

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

Returns the counter-clockwise predecessor in face.

Definition at line 145 of file Graph_d.h.

◆ counterClockwiseFaceSucc()

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

Returns the counter-clockwise successor in face.

Definition at line 142 of file Graph_d.h.

◆ cyclicPred()

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

Returns the cyclic predecessor in the adjacency list.

Definition at line 295 of file Graph_d.h.

◆ cyclicSucc()

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

Returns the cyclic successor in the adjacency list.

Definition at line 291 of file Graph_d.h.

◆ faceCyclePred()

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

Returns the cyclic predecessor in face.

Definition at line 152 of file Graph_d.h.

◆ faceCycleSucc()

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

Returns the cyclic successor in face.

Definition at line 149 of file Graph_d.h.

◆ index()

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

Returns the index of this adjacency element.

Definition at line 115 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 418 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 416 of file Graph_d.h.

◆ operator edge()

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

Conversion to edge.

Definition at line 100 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 106 of file Graph_d.h.

◆ pred()

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

Returns the predecessor in the adjacency list.

Definition at line 158 of file Graph_d.h.

◆ succ()

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

Returns the successor in the adjacency list.

Definition at line 155 of file Graph_d.h.

◆ theEdge()

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

Returns the edge associated with this adjacency entry.

Definition at line 97 of file Graph_d.h.

◆ theNode()

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

Returns the node whose adjacency list contains this element.

Definition at line 103 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 109 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 112 of file Graph_d.h.

Friends And Related Symbol Documentation

◆ Graph

friend class Graph
friend

Definition at line 80 of file Graph_d.h.

◆ internal::GraphList< AdjElement >

Definition at line 81 of file Graph_d.h.

◆ internal::GraphListBase

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: