dispenso
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 >
NaddNode (T &&f)
 
size_t numNodes () const
 
const Nnode (size_t index) const
 
Nnode (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 >

Definition at line 410 of file graph.h.

Member Typedef Documentation

◆ NodeType

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

Definition at line 412 of file graph.h.

Constructor & Destructor Documentation

◆ SubgraphT()

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

Definition at line 416 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.

Definition at line 428 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 472 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 460 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 451 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 443 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 435 of file graph.h.

Friends And Related Symbol Documentation

◆ GraphT

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

Definition at line 517 of file graph.h.


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