fpmas 1.6
Public Types | Public Member Functions | List of all members
fpmas::api::graph::Node< _IdType, _EdgeType > Class Template Referenceabstract

#include <node.h>

Inheritance diagram for fpmas::api::graph::Node< _IdType, _EdgeType >:
Inheritance graph
[legend]

Public Types

typedef _IdType IdType
 
typedef _EdgeType EdgeType
 

Public Member Functions

virtual IdType getId () const =0
 
virtual float getWeight () const =0
 
virtual void setWeight (float weight)=0
 
virtual const std::vector< EdgeType * > getIncomingEdges () const =0
 
virtual const std::vector< EdgeType * > getIncomingEdges (LayerId layer_id) const =0
 
virtual const std::vector< typename EdgeType::NodeType * > inNeighbors () const =0
 
virtual const std::vector< typename EdgeType::NodeType * > inNeighbors (LayerId layer_id) const =0
 
virtual const std::vector< EdgeType * > getOutgoingEdges () const =0
 
virtual const std::vector< EdgeType * > getOutgoingEdges (LayerId layer_id) const =0
 
virtual const std::vector< typename EdgeType::NodeType * > outNeighbors () const =0
 
virtual const std::vector< typename EdgeType::NodeType * > outNeighbors (LayerId layer_id) const =0
 
virtual void linkIn (EdgeType *edge)=0
 
virtual void linkOut (EdgeType *edge)=0
 
virtual void unlinkIn (EdgeType *edge)=0
 
virtual void unlinkOut (EdgeType *edge)=0
 

Detailed Description

template<typename _IdType, typename _EdgeType>
class fpmas::api::graph::Node< _IdType, _EdgeType >

Graph node

Member Typedef Documentation

◆ IdType

template<typename _IdType , typename _EdgeType >
typedef _IdType fpmas::api::graph::Node< _IdType, _EdgeType >::IdType

ID type

◆ EdgeType

template<typename _IdType , typename _EdgeType >
typedef _EdgeType fpmas::api::graph::Node< _IdType, _EdgeType >::EdgeType

Edge type

Member Function Documentation

◆ getId()

template<typename _IdType , typename _EdgeType >
virtual IdType fpmas::api::graph::Node< _IdType, _EdgeType >::getId ( ) const
pure virtual

◆ getWeight()

template<typename _IdType , typename _EdgeType >
virtual float fpmas::api::graph::Node< _IdType, _EdgeType >::getWeight ( ) const
pure virtual

Weight of the Node.

The node's weight might be used to perform LoadBalancing.

Returns
node's weight

Implemented in fpmas::graph::Node< _IdType, _EdgeType >, and fpmas::graph::Node< DistributedId, api::graph::DistributedEdge< T > >.

◆ setWeight()

template<typename _IdType , typename _EdgeType >
virtual void fpmas::api::graph::Node< _IdType, _EdgeType >::setWeight ( float  weight)
pure virtual

Sets the weight of the Node.

Parameters
weightnew weight

Implemented in fpmas::graph::Node< _IdType, _EdgeType >, and fpmas::graph::Node< DistributedId, api::graph::DistributedEdge< T > >.

◆ getIncomingEdges() [1/2]

template<typename _IdType , typename _EdgeType >
virtual const std::vector< EdgeType * > fpmas::api::graph::Node< _IdType, _EdgeType >::getIncomingEdges ( ) const
pure virtual

Returns a vector containing pointers to all the incoming edges of this node.

Returns
pointers to incoming edges

Implemented in fpmas::graph::Node< _IdType, _EdgeType >, and fpmas::graph::Node< DistributedId, api::graph::DistributedEdge< T > >.

◆ getIncomingEdges() [2/2]

template<typename _IdType , typename _EdgeType >
virtual const std::vector< EdgeType * > fpmas::api::graph::Node< _IdType, _EdgeType >::getIncomingEdges ( LayerId  layer_id) const
pure virtual

Returns a vector containing pointers to the incoming edges of this node on the specified layer.

Parameters
layer_idlayer ID
Returns
pointers to incoming edges

Implemented in fpmas::graph::Node< _IdType, _EdgeType >, and fpmas::graph::Node< DistributedId, api::graph::DistributedEdge< T > >.

◆ inNeighbors() [1/2]

template<typename _IdType , typename _EdgeType >
virtual const std::vector< typename EdgeType::NodeType * > fpmas::api::graph::Node< _IdType, _EdgeType >::inNeighbors ( ) const
pure virtual

Returns a vector containing pointers to all the nodes connected to this node with an incoming edge, as returned by getIncomingEdges().

Returns
pointers to incoming neighbors

Implemented in fpmas::graph::Node< _IdType, _EdgeType >, and fpmas::graph::Node< DistributedId, api::graph::DistributedEdge< T > >.

◆ inNeighbors() [2/2]

template<typename _IdType , typename _EdgeType >
virtual const std::vector< typename EdgeType::NodeType * > fpmas::api::graph::Node< _IdType, _EdgeType >::inNeighbors ( LayerId  layer_id) const
pure virtual

Returns a vector containing pointers to the nodes connected to this node with an incoming edge on the specified layer, as returned by getIncomingEdges(layer_id).

Parameters
layer_idlayer ID
Returns
pointers to incoming neighbors

Implemented in fpmas::graph::Node< _IdType, _EdgeType >, and fpmas::graph::Node< DistributedId, api::graph::DistributedEdge< T > >.

◆ getOutgoingEdges() [1/2]

template<typename _IdType , typename _EdgeType >
virtual const std::vector< EdgeType * > fpmas::api::graph::Node< _IdType, _EdgeType >::getOutgoingEdges ( ) const
pure virtual

Returns a vector containing pointers to all the outgoing edges of this node.

Returns
pointers to outgoing edges

Implemented in fpmas::graph::Node< _IdType, _EdgeType >, and fpmas::graph::Node< DistributedId, api::graph::DistributedEdge< T > >.

◆ getOutgoingEdges() [2/2]

template<typename _IdType , typename _EdgeType >
virtual const std::vector< EdgeType * > fpmas::api::graph::Node< _IdType, _EdgeType >::getOutgoingEdges ( LayerId  layer_id) const
pure virtual

Returns a vector containing pointers to the outgoing edges of this node on the specified layer.

Parameters
layer_idlayer ID
Returns
pointers to outgoing edges

Implemented in fpmas::graph::Node< _IdType, _EdgeType >, and fpmas::graph::Node< DistributedId, api::graph::DistributedEdge< T > >.

◆ outNeighbors() [1/2]

template<typename _IdType , typename _EdgeType >
virtual const std::vector< typename EdgeType::NodeType * > fpmas::api::graph::Node< _IdType, _EdgeType >::outNeighbors ( ) const
pure virtual

Returns a vector containing pointers to all the nodes connected to this node with an outgoing edge, as returned by getOutgoingEdges().

Returns
pointers to outgoing neighbors

Implemented in fpmas::graph::Node< _IdType, _EdgeType >, and fpmas::graph::Node< DistributedId, api::graph::DistributedEdge< T > >.

◆ outNeighbors() [2/2]

template<typename _IdType , typename _EdgeType >
virtual const std::vector< typename EdgeType::NodeType * > fpmas::api::graph::Node< _IdType, _EdgeType >::outNeighbors ( LayerId  layer_id) const
pure virtual

Returns a vector containing pointers to the nodes connected to this node with an outgoing edge on the specified layer, as returned by getOutgoingEdges(layer_id).

Parameters
layer_idlayer ID
Returns
pointers to outgoing neighbors

Implemented in fpmas::graph::Node< _IdType, _EdgeType >, and fpmas::graph::Node< DistributedId, api::graph::DistributedEdge< T > >.

◆ linkIn()

template<typename _IdType , typename _EdgeType >
virtual void fpmas::api::graph::Node< _IdType, _EdgeType >::linkIn ( EdgeType edge)
pure virtual

Links the specified incoming edge to this node.

Once the node is linked, it should be returned in the following lists :

Parameters
edgeincoming edge to link

Implemented in fpmas::graph::Node< _IdType, _EdgeType >, and fpmas::graph::Node< DistributedId, api::graph::DistributedEdge< T > >.

◆ linkOut()

template<typename _IdType , typename _EdgeType >
virtual void fpmas::api::graph::Node< _IdType, _EdgeType >::linkOut ( EdgeType edge)
pure virtual

Links the specified outgoing edge to this node.

Once the node is linked, it should be returned in the following lists :

Parameters
edgeoutgoing edge to link

Implemented in fpmas::graph::Node< _IdType, _EdgeType >, and fpmas::graph::Node< DistributedId, api::graph::DistributedEdge< T > >.

◆ unlinkIn()

template<typename _IdType , typename _EdgeType >
virtual void fpmas::api::graph::Node< _IdType, _EdgeType >::unlinkIn ( EdgeType edge)
pure virtual

Unlinks the specified incoming edge from this node.

Once the node is unlinked, it should not be returned anymore by the following functions :

Parameters
edgeincoming edge to unlink

Implemented in fpmas::graph::Node< _IdType, _EdgeType >, and fpmas::graph::Node< DistributedId, api::graph::DistributedEdge< T > >.

◆ unlinkOut()

template<typename _IdType , typename _EdgeType >
virtual void fpmas::api::graph::Node< _IdType, _EdgeType >::unlinkOut ( EdgeType edge)
pure virtual

Unlinks the specified outgoing edge from this node.

Once the node is unlinked, it should not be returned anymore by the following functions :

Parameters
edgeoutgoing edge to unlink

Implemented in fpmas::graph::Node< _IdType, _EdgeType >, and fpmas::graph::Node< DistributedId, api::graph::DistributedEdge< T > >.


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