fpmas 1.6
Public Member Functions | List of all members
fpmas::graph::DistributedNode< T > Class Template Reference

#include <distributed_node.h>

Inheritance diagram for fpmas::graph::DistributedNode< T >:
Inheritance graph
[legend]
Collaboration diagram for fpmas::graph::DistributedNode< T >:
Collaboration graph
[legend]

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
 
Mutexmutex () override
 
const Mutexmutex () 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
 
- Public Member Functions inherited from fpmas::api::graph::Node< DistributedId, DistributedEdge< T > >
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

- Public Types inherited from fpmas::api::graph::Node< _IdType, _EdgeType >
typedef _IdType IdType
 
typedef _EdgeType EdgeType
 
- Public Types inherited from fpmas::api::graph::DistributedNode< T >
typedef T data_type
 
- Public Types inherited from fpmas::api::graph::Node< DistributedId, DistributedEdge< T > >
typedef DistributedId IdType
 
typedef DistributedEdge< T > EdgeType
 

Detailed Description

template<typename T>
class fpmas::graph::DistributedNode< T >

api::graph::DistributedNode implementation.

Constructor & Destructor Documentation

◆ DistributedNode() [1/2]

template<typename T >
fpmas::graph::DistributedNode< T >::DistributedNode ( const DistributedId id,
const T &  data 
)
inline

DistributedNode constructor.

data is copied into the DistributedNode.

Parameters
idnode id
datalvalue reference data to copy to the node

◆ DistributedNode() [2/2]

template<typename T >
fpmas::graph::DistributedNode< T >::DistributedNode ( const DistributedId id,
T &&  data 
)
inline

DistributedNode constructor.

data is moved into the DistributedNode.

Parameters
idnode id
datarvalue reference to data to move into the node

◆ ~DistributedNode()

template<typename T >
fpmas::graph::DistributedNode< T >::~DistributedNode ( )
inlinevirtual

Member Function Documentation

◆ location()

template<typename T >
int fpmas::graph::DistributedNode< T >::location ( ) const
inlineoverridevirtual

Rank of the process on which this node is currently located.

If the node is LOCAL, this rank corresponds to the current process.

Returns
node location

Implements fpmas::api::graph::DistributedNode< T >.

◆ setLocation()

template<typename T >
void fpmas::graph::DistributedNode< T >::setLocation ( int  location)
inlineoverridevirtual

Updates the location of the node.

Only used for internal / serialization.

Parameters
locationnew location

Implements fpmas::api::graph::DistributedNode< T >.

◆ state()

template<typename T >
api::graph::LocationState fpmas::graph::DistributedNode< T >::state ( ) const
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.

Returns
current node state

Implements fpmas::api::graph::DistributedNode< T >.

◆ setState()

template<typename T >
void fpmas::graph::DistributedNode< T >::setState ( api::graph::LocationState  state)
inlineoverridevirtual

Updates the state of the node.

Only intended for internal / serialization usage.

Parameters
statenew state

Implements fpmas::api::graph::DistributedNode< T >.

◆ data() [1/2]

template<typename T >
T & fpmas::graph::DistributedNode< T >::data ( )
inlineoverridevirtual

Returns a reference to the internal node data.

Returns
reference to node's data

Implements fpmas::api::graph::DistributedNode< T >.

◆ data() [2/2]

template<typename T >
const T & fpmas::graph::DistributedNode< T >::data ( ) const
inlineoverridevirtual

Returns a reference to the internal node data.

Returns
reference to node's data

Implements fpmas::api::graph::DistributedNode< T >.

◆ setMutex()

template<typename T >
void fpmas::graph::DistributedNode< T >::setMutex ( Mutex mutex)
inlineoverridevirtual

Sets the internal mutex of the node.

The concrete mutex type used might depend on the graph synchronization mode.

Parameters
mutexnode mutex

Implements fpmas::api::graph::DistributedNode< T >.

◆ mutex() [1/2]

template<typename T >
Mutex * fpmas::graph::DistributedNode< T >::mutex ( )
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.

Returns
pointer to the internal node mutex

Implements fpmas::api::graph::DistributedNode< T >.

◆ mutex() [2/2]

template<typename T >
const Mutex * fpmas::graph::DistributedNode< T >::mutex ( ) const
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.

Returns
pointer to the internal node mutex

Implements fpmas::api::graph::DistributedNode< T >.


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