![]() |
fpmas 1.6
|
#include <distributed_node.h>
Public Types | |
typedef T | data_type |
![]() | |
typedef DistributedId | IdType |
typedef DistributedEdge< T > | EdgeType |
Public Member Functions | |
virtual int | location () const =0 |
virtual void | setLocation (int location)=0 |
virtual LocationState | state () const =0 |
virtual void | setState (LocationState state)=0 |
virtual T & | data ()=0 |
virtual const T & | data () const =0 |
virtual void | setMutex (synchro::Mutex< T > *mutex)=0 |
virtual synchro::Mutex< T > * | mutex ()=0 |
virtual const synchro::Mutex< T > * | mutex () const =0 |
![]() | |
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 |
DistributedNode API.
The DistributedNode is an extension of the Node API, specialized using DistributedId and DistributedEdge, and introduces some distribution related concepts.
The class also introduces T, the type of the data contained in the DistributedNode. Each DistributedNode instance owns an instance of T.
T | data type |
typedef T fpmas::api::graph::DistributedNode< T >::data_type |
Type of data contained in the node.
|
pure virtual |
Rank of the process on which this node is currently located.
If the node is LOCAL, this rank corresponds to the current process.
Implemented in fpmas::graph::DistributedNode< T >.
|
pure virtual |
Updates the location of the node.
Only used for internal / serialization.
location | new location |
Implemented in fpmas::graph::DistributedNode< T >.
|
pure virtual |
Current state of the node.
A DistributedNode is LOCAL iff it is currently hosted and managed by the current process. A DISTANT DistributedNode correspond to a representation of a node currently hosted by an other process.
Implemented in fpmas::graph::DistributedNode< T >.
|
pure virtual |
Updates the state of the node.
Only intended for internal / serialization usage.
state | new state |
Implemented in fpmas::graph::DistributedNode< T >.
|
pure virtual |
Returns a reference to the internal node data.
Implemented in fpmas::graph::DistributedNode< T >.
|
pure virtual |
Returns a reference to the internal node data.
Implemented in fpmas::graph::DistributedNode< T >.
|
pure virtual |
Sets the internal mutex of the node.
The concrete mutex type used might depend on the graph synchronization mode.
mutex | node mutex |
Implemented in fpmas::graph::DistributedNode< T >.
|
pure virtual |
Internal node mutex.
The role of the mutex is to protect the access to the internal T instance. The data references return by the Mutex methods correspond the node's internal T instance.
Implemented in fpmas::graph::DistributedNode< T >.
|
pure virtual |
Internal node mutex.
The role of the mutex is to protect the access to the internal T instance. The data references return by the Mutex methods correspond the node's internal T instance.
Implemented in fpmas::graph::DistributedNode< T >.