Node Class Reference

API: cTopology::Node Class Reference
API
cTopology::Node Class Reference

Public Member Functions

 Node (int moduleId=-1)
Node attributes: weight, enabled state, correspondence to modules.
int getModuleId () const
cModule * getModule () const
double getWeight () const
void setWeight (double d)
bool isEnabled () const
void enable ()
void disable ()
Node connectivity.
int getNumInLinks () const
LinkIn * getLinkIn (int i)
int getNumOutLinks () const
LinkOut * getLinkOut (int i)
Result of shortest path extraction.
double getDistanceToTarget () const
int getNumPaths () const
LinkOut * getPath (int) const

Description

Supporting class for cTopology, represents a node in the graph.

Constructor & Destructor Documentation

◆ Node()

Node ( int moduleId = -1)
inline

Constructor

Member Function Documentation

◆ getModuleId()

int getModuleId ( ) const
inline

Returns the ID of the network module to which this node corresponds.

◆ getModule()

cModule * getModule ( ) const
inline

Returns the pointer to the network module to which this node corresponds.

References omnetpp::getSimulation().

◆ getWeight()

double getWeight ( ) const
inline

Returns the weight of this node. Weight is used with the weighted shortest path finder methods of cTopology.

◆ setWeight()

void setWeight ( double d)
inline

Sets the weight of this node. Weight is used with the weighted shortest path finder methods of cTopology.

◆ isEnabled()

bool isEnabled ( ) const
inline

Returns true of this node is enabled. This has significance with the shortest path finder methods of cTopology.

◆ enable()

void enable ( )
inline

Enable this node. This has significance with the shortest path finder methods of cTopology.

◆ disable()

void disable ( )
inline

Disable this node. This has significance with the shortest path finder methods of cTopology.

◆ getNumInLinks()

int getNumInLinks ( ) const
inline

Returns the number of incoming links to this graph node.

◆ getLinkIn()

LinkIn * getLinkIn ( int i)

Returns ith incoming link of graph node.

◆ getNumOutLinks()

int getNumOutLinks ( ) const
inline

Returns the number of outgoing links from this graph node.

◆ getLinkOut()

LinkOut * getLinkOut ( int i)

Returns ith outgoing link of graph node.

◆ getDistanceToTarget()

double getDistanceToTarget ( ) const
inline

Returns the distance of this node to the target node.

◆ getNumPaths()

int getNumPaths ( ) const
inline

Returns the number of shortest paths towards the target node. (There may be several paths with the same length.)

◆ getPath()

LinkOut * getPath ( int ) const
inline

Returns the next link in the ith shortest paths towards the target node. (There may be several paths with the same length.)