Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

ogdf::NodeElement Class Reference

Class for the representation of nodes. More...

#include <ogdf/basic/Graph_d.h>

+ Inheritance diagram for ogdf::NodeElement:

Public Member Functions

template<class EDGELIST >
void adjEdges (EDGELIST &edgeList) const
 Returns a list with all edges incident to this node. More...
 
template<class ADJLIST >
void allAdjEntries (ADJLIST &adjList) const
 Returns a list with all adjacency entries of this node. More...
 
int degree () const
 Returns the degree of the node (indegree + outdegree). More...
 
adjEntry firstAdj () const
 Returns the first entry in the adjaceny list. More...
 
int indeg () const
 Returns the indegree of the node. More...
 
int index () const
 Returns the (unique) node index. More...
 
template<class EDGELIST >
void inEdges (EDGELIST &edgeList) const
 Returns a list with all incoming edges of this node. More...
 
adjEntry lastAdj () const
 Returns the last entry in the adjacency list. More...
 
int outdeg () const
 Returns the outdegree of the node. More...
 
template<class EDGELIST >
void outEdges (EDGELIST &edgeList) const
 Returns a list with all outgoing edges of this node. More...
 
node pred () const
 Returns the predecessor in the list of all nodes. More...
 
node succ () const
 Returns the successor in the list of all nodes. More...
 

Static Public Member Functions

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

Public Attributes

internal::GraphObjectContainer< AdjElementadjEntries
 The container containing all entries in the adjacency list of this node. More...
 

Private Member Functions

 NodeElement (int id)
 Constructs a node element with index id. More...
 

Private Attributes

int m_id
 The (unique) index of the node. More...
 
int m_indeg
 The indegree of the node. More...
 
int m_outdeg
 The outdegree of the node. 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< NodeElement >
 

Detailed Description

Class for the representation of nodes.

Definition at line 169 of file Graph_d.h.

Constructor & Destructor Documentation

◆ NodeElement()

ogdf::NodeElement::NodeElement ( int  id)
inlineprivate

Constructs a node element with index id.

Definition at line 194 of file Graph_d.h.

Member Function Documentation

◆ adjEdges()

template<class EDGELIST >
void ogdf::NodeElement::adjEdges ( EDGELIST &  edgeList) const
inline

Returns a list with all edges incident to this node.

Note that each self-loop of this node is contained twice in the list.

Template Parameters
EDGELISTis the type of edge list, which is returned.
Parameters
edgeListis assigned the list of all edges incident to this node (including incoming and outcoming edges).

Definition at line 244 of file Graph_d.h.

◆ allAdjEntries()

template<class ADJLIST >
void ogdf::NodeElement::allAdjEntries ( ADJLIST &  adjList) const
inline

Returns a list with all adjacency entries of this node.

Template Parameters
ADJLISTis the type of adjacency entry list, which is returned.
Parameters
adjListis assigned the list of all adjacency entries of this node.

Definition at line 228 of file Graph_d.h.

◆ compare()

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

Standard Comparer.

Definition at line 273 of file Graph_d.h.

◆ degree()

int ogdf::NodeElement::degree ( ) const
inline

Returns the degree of the node (indegree + outdegree).

Definition at line 210 of file Graph_d.h.

◆ firstAdj()

adjEntry ogdf::NodeElement::firstAdj ( ) const
inline

Returns the first entry in the adjaceny list.

Definition at line 213 of file Graph_d.h.

◆ indeg()

int ogdf::NodeElement::indeg ( ) const
inline

Returns the indegree of the node.

Definition at line 206 of file Graph_d.h.

◆ index()

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

Returns the (unique) node index.

Definition at line 203 of file Graph_d.h.

◆ inEdges()

template<class EDGELIST >
void ogdf::NodeElement::inEdges ( EDGELIST &  edgeList) const

Returns a list with all incoming edges of this node.

Template Parameters
EDGELISTis the type of edge list, which is returned.
Parameters
edgeListis assigned the list of all incoming edges incident to this node.

Definition at line 421 of file Graph_d.h.

◆ lastAdj()

adjEntry ogdf::NodeElement::lastAdj ( ) const
inline

Returns the last entry in the adjacency list.

Definition at line 215 of file Graph_d.h.

◆ outdeg()

int ogdf::NodeElement::outdeg ( ) const
inline

Returns the outdegree of the node.

Definition at line 208 of file Graph_d.h.

◆ outEdges()

template<class EDGELIST >
void ogdf::NodeElement::outEdges ( EDGELIST &  edgeList) const

Returns a list with all outgoing edges of this node.

Template Parameters
EDGELISTis the type of edge list, which is returned.
Parameters
edgeListis assigned the list of all outgoing edges incident to this node.

Definition at line 430 of file Graph_d.h.

◆ pred()

node ogdf::NodeElement::pred ( ) const
inline

Returns the predecessor in the list of all nodes.

Definition at line 220 of file Graph_d.h.

◆ succ()

node ogdf::NodeElement::succ ( ) const
inline

Returns the successor in the list of all nodes.

Definition at line 218 of file Graph_d.h.

Friends And Related Function Documentation

◆ Graph

friend class Graph
friend

Definition at line 170 of file Graph_d.h.

◆ internal::GraphList< NodeElement >

friend class internal::GraphList< NodeElement >
friend

Definition at line 171 of file Graph_d.h.

Member Data Documentation

◆ adjEntries

internal::GraphObjectContainer<AdjElement> ogdf::NodeElement::adjEntries

The container containing all entries in the adjacency list of this node.

Definition at line 200 of file Graph_d.h.

◆ m_id

int ogdf::NodeElement::m_id
private

The (unique) index of the node.

Definition at line 176 of file Graph_d.h.

◆ m_indeg

int ogdf::NodeElement::m_indeg
private

The indegree of the node.

Definition at line 174 of file Graph_d.h.

◆ m_outdeg

int ogdf::NodeElement::m_outdeg
private

The outdegree of the node.

Definition at line 175 of file Graph_d.h.


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