Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

ogdf::EdgeElement Class Reference

Class for the representation of edges. More...

#include <ogdf/basic/Graph_d.h>

+ Inheritance diagram for ogdf::EdgeElement:

Public Member Functions

adjEntry adjSource () const
 Returns the corresponding adjacancy entry at source node. More...
 
adjEntry adjTarget () const
 Returns the corresponding adjacancy entry at target node. More...
 
node commonNode (edge e) const
 Returns the common node of the edge and e. Returns nullptr if the two edges are not adjacent. More...
 
adjEntry getAdj (node v) const
 Returns an adjacency entry of this edge at node v. If this is a self-loop the source adjacency entry will always be returned. More...
 
int index () const
 Returns the index of the edge. More...
 
bool isIncident (node v) const
 Returns true iff v is incident to the edge. More...
 
bool isSelfLoop () const
 
node opposite (node v) const
 Returns the adjacent node different from v. More...
 
edge pred () const
 Returns the predecessor in the list of all edges. More...
 
node source () const
 Returns the source node of the edge. More...
 
edge succ () const
 Returns the successor in the list of all edges. More...
 
node target () const
 Returns the target node of the edge. More...
 

Static Public Member Functions

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

Private Member Functions

 EdgeElement (node src, node tgt, AdjElement *adjSrc, AdjElement *adjTgt, int id)
 Constructs an edge element (src,tgt). More...
 
 EdgeElement (node src, node tgt, int id)
 Constructs an edge element (src,tgt). More...
 

Private Attributes

AdjElement * m_adjSrc
 Corresponding adjacancy entry at source node. More...
 
AdjElement * m_adjTgt
 Corresponding adjacancy entry at target node. More...
 
int m_id
 
node m_src
 The source node of the edge. More...
 
node m_tgt
 The target node of the edge. More...
 
- Private Attributes inherited from ogdf::internal::GraphElement
GraphElement * m_next
 The successor in the list. More...
 
GraphElement * m_prev
 The predecessor in the list. More...
 

Friends

class Graph
 
class internal::GraphList< EdgeElement >
 

Detailed Description

Class for the representation of edges.

Definition at line 291 of file Graph_d.h.

Constructor & Destructor Documentation

◆ EdgeElement() [1/2]

ogdf::EdgeElement::EdgeElement ( node  src,
node  tgt,
AdjElement *  adjSrc,
AdjElement *  adjTgt,
int  id 
)
inlineprivate

Constructs an edge element (src,tgt).

Parameters
srcis the source node of the edge.
tgtis the target node of the edge.
adjSrcis the corresponding adjacency entry at source node.
adjTgtis the corresponding adjacency entry at target node.
idis the index of the edge.

Definition at line 309 of file Graph_d.h.

◆ EdgeElement() [2/2]

ogdf::EdgeElement::EdgeElement ( node  src,
node  tgt,
int  id 
)
inlineprivate

Constructs an edge element (src,tgt).

Parameters
srcis the source node of the edge.
tgtis the target node of the edge.
idis the index of the edge.

Definition at line 318 of file Graph_d.h.

Member Function Documentation

◆ adjSource()

adjEntry ogdf::EdgeElement::adjSource ( ) const
inline

Returns the corresponding adjacancy entry at source node.

Definition at line 330 of file Graph_d.h.

◆ adjTarget()

adjEntry ogdf::EdgeElement::adjTarget ( ) const
inline

Returns the corresponding adjacancy entry at target node.

Definition at line 332 of file Graph_d.h.

◆ commonNode()

node ogdf::EdgeElement::commonNode ( edge  e) const
inline

Returns the common node of the edge and e. Returns nullptr if the two edges are not adjacent.

Definition at line 353 of file Graph_d.h.

◆ compare()

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

Standard Comparer.

Definition at line 363 of file Graph_d.h.

◆ getAdj()

adjEntry ogdf::EdgeElement::getAdj ( node  v) const
inline

Returns an adjacency entry of this edge at node v. If this is a self-loop the source adjacency entry will always be returned.

Definition at line 357 of file Graph_d.h.

◆ index()

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

Returns the index of the edge.

Definition at line 323 of file Graph_d.h.

◆ isIncident()

bool ogdf::EdgeElement::isIncident ( node  v) const
inline

Returns true iff v is incident to the edge.

Definition at line 350 of file Graph_d.h.

◆ isSelfLoop()

bool ogdf::EdgeElement::isSelfLoop ( ) const
inline

Definition at line 337 of file Graph_d.h.

◆ opposite()

node ogdf::EdgeElement::opposite ( node  v) const
inline

Returns the adjacent node different from v.

Definition at line 335 of file Graph_d.h.

◆ pred()

edge ogdf::EdgeElement::pred ( ) const
inline

Returns the predecessor in the list of all edges.

Definition at line 342 of file Graph_d.h.

◆ source()

node ogdf::EdgeElement::source ( ) const
inline

Returns the source node of the edge.

Definition at line 325 of file Graph_d.h.

◆ succ()

edge ogdf::EdgeElement::succ ( ) const
inline

Returns the successor in the list of all edges.

Definition at line 340 of file Graph_d.h.

◆ target()

node ogdf::EdgeElement::target ( ) const
inline

Returns the target node of the edge.

Definition at line 327 of file Graph_d.h.

Friends And Related Function Documentation

◆ Graph

friend class Graph
friend

Definition at line 292 of file Graph_d.h.

◆ internal::GraphList< EdgeElement >

friend class internal::GraphList< EdgeElement >
friend

Definition at line 293 of file Graph_d.h.

Member Data Documentation

◆ m_adjSrc

AdjElement* ogdf::EdgeElement::m_adjSrc
private

Corresponding adjacancy entry at source node.

Definition at line 297 of file Graph_d.h.

◆ m_adjTgt

AdjElement* ogdf::EdgeElement::m_adjTgt
private

Corresponding adjacancy entry at target node.

Definition at line 298 of file Graph_d.h.

◆ m_id

int ogdf::EdgeElement::m_id
private

Definition at line 299 of file Graph_d.h.

◆ m_src

node ogdf::EdgeElement::m_src
private

The source node of the edge.

Definition at line 295 of file Graph_d.h.

◆ m_tgt

node ogdf::EdgeElement::m_tgt
private

The target node of the edge.

Definition at line 296 of file Graph_d.h.


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