![]() |
fpmas 1.6
|
#include <distributed_node.h>
Public Member Functions | |
DistributedNode (const DistributedId &id, const T &data) | |
DistributedNode (const DistributedId &id, T &&data) | |
int | location () const override |
void | setLocation (int location) override |
api::graph::LocationState | state () const override |
void | setState (api::graph::LocationState state) override |
T & | data () override |
const T & | data () const override |
void | setMutex (Mutex *mutex) override |
Mutex * | mutex () override |
const Mutex * | mutex () const override |
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 |
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 |
Additional Inherited Members | |
![]() | |
typedef _IdType | IdType |
typedef _EdgeType | EdgeType |
![]() | |
typedef T | data_type |
![]() | |
typedef DistributedId | IdType |
typedef DistributedEdge< T > | EdgeType |
api::graph::DistributedNode implementation.
|
inline |
DistributedNode constructor.
data
is copied into the DistributedNode.
id | node id |
data | lvalue reference data to copy to the node |
|
inline |
DistributedNode constructor.
data
is moved into the DistributedNode.
id | node id |
data | rvalue reference to data to move into the node |
|
inlinevirtual |
Reimplemented from fpmas::api::graph::DistributedNode< T >.
|
inlineoverridevirtual |
Rank of the process on which this node is currently located.
If the node is LOCAL, this rank corresponds to the current process.
Implements fpmas::api::graph::DistributedNode< T >.
|
inlineoverridevirtual |
Updates the location of the node.
Only used for internal / serialization.
location | new location |
Implements fpmas::api::graph::DistributedNode< T >.
|
inlineoverridevirtual |
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.
Implements fpmas::api::graph::DistributedNode< T >.
|
inlineoverridevirtual |
Updates the state of the node.
Only intended for internal / serialization usage.
state | new state |
Implements fpmas::api::graph::DistributedNode< T >.
|
inlineoverridevirtual |
Returns a reference to the internal node data.
Implements fpmas::api::graph::DistributedNode< T >.
|
inlineoverridevirtual |
Returns a reference to the internal node data.
Implements fpmas::api::graph::DistributedNode< T >.
|
inlineoverridevirtual |
Sets the internal mutex of the node.
The concrete mutex type used might depend on the graph synchronization mode.
mutex | node mutex |
Implements fpmas::api::graph::DistributedNode< T >.
|
inlineoverridevirtual |
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.
Implements fpmas::api::graph::DistributedNode< T >.
|
inlineoverridevirtual |
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.
Implements fpmas::api::graph::DistributedNode< T >.