dispenso 1.4.1
A library for task parallelism
Loading...
Searching...
No Matches
dispenso::SubgraphT< N > Class Template Reference

Public Types

using NodeType = N
 

Public Member Functions

 SubgraphT (const SubgraphT< N > &)=delete
 
SubgraphT< N > & operator= (const SubgraphT< N > &)=delete
 
 SubgraphT (SubgraphT< N > &&other) noexcept
 
template<class T >
N & addNode (T &&f)
 
size_t numNodes () const
 
const N & node (size_t index) const
 
N & node (size_t index)
 
template<class F >
void forEachNode (F &&func) const
 
template<class F >
void forEachNode (F &&func)
 
void clear ()
 

Friends

template<class T >
class GraphT
 

Detailed Description

template<class N>
class dispenso::SubgraphT< N >
Examples
graph_example.cpp.

Definition at line 416 of file graph.h.

Member Typedef Documentation

◆ NodeType

template<class N >
using dispenso::SubgraphT< N >::NodeType = N

Definition at line 418 of file graph.h.

Constructor & Destructor Documentation

◆ SubgraphT()

template<class N >
dispenso::SubgraphT< N >::SubgraphT ( SubgraphT< N > && other)
inlinenoexcept

Definition at line 422 of file graph.h.

◆ ~SubgraphT()

template<class N >
dispenso::SubgraphT< N >::~SubgraphT ( )

Definition at line 73 of file graph.cpp.

Member Function Documentation

◆ addNode()

template<class N >
template<class T >
N & dispenso::SubgraphT< N >::addNode ( T && f)
inline

Construct a NodeType with a valid functor. This is not concurrency safe.

Parameters
fA functor with signature void().
Returns
reference to the created node.
Examples
graph_example.cpp.

Definition at line 434 of file graph.h.

◆ clear()

template<class N >
void dispenso::SubgraphT< N >::clear ( )

Removes all dependency between nodes of this subgraph and other nodes, destroy this subgraph nodes. This is not concurrency safe.

Definition at line 54 of file graph.cpp.

◆ forEachNode() [1/2]

template<class N >
template<class F >
void dispenso::SubgraphT< N >::forEachNode ( F && func)
inline

apply an func to each node of the subgraph. This is not concurrency safe. This methods should never be called concurrent to when the graph execution is happening

Parameters
funca functor with signature void(Node&)

Definition at line 478 of file graph.h.

◆ forEachNode() [2/2]

template<class N >
template<class F >
void dispenso::SubgraphT< N >::forEachNode ( F && func) const
inline

apply an func to each node of the subgraph. Concurrency safe.

Parameters
funca functor with signature void(const Node&)

Definition at line 466 of file graph.h.

◆ node() [1/2]

template<class N >
N & dispenso::SubgraphT< N >::node ( size_t index)
inline

Return reference to node with index. Concurrency safe.

Parameters
index- index of the node

Definition at line 457 of file graph.h.

◆ node() [2/2]

template<class N >
const N & dispenso::SubgraphT< N >::node ( size_t index) const
inline

Return const reference to node with index. Concurrency safe.

Parameters
index- index of the node

Definition at line 449 of file graph.h.

◆ numNodes()

template<class N >
size_t dispenso::SubgraphT< N >::numNodes ( ) const
inline

Return number of nodes in subgraph. Concurrency safe.

Definition at line 441 of file graph.h.

Friends And Related Symbol Documentation

◆ GraphT

template<class N >
template<class T >
friend class GraphT
friend

Definition at line 523 of file graph.h.


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