Interface Documentation
Version: 2.-1 (devel)
Public Types | Public Member Functions | List of all members
flecsi::utils::dag< NODE_POLICY > Struct Template Reference

Public Types

using node_t = dag_node< NODE_POLICY >
 
using node_map_t = std::map< size_t, node_t >
 
using node_vector_t = std::vector< node_t >
 
using node_list_t = std::list< node_t >
 

Public Member Functions

std::string const & label () const
 
std::string & label ()
 
node_map_t const & nodes () const
 
node_map_t & nodes ()
 
node_tnode (size_t hash)
 
bool initialize_node (node_t const &node)
 
bool add_edge (size_t to, size_t from)
 
node_vector_t sort ()
 

Member Function Documentation

◆ add_edge()

template<typename NODE_POLICY >
bool flecsi::utils::dag< NODE_POLICY >::add_edge ( size_t  to,
size_t  from 
)
inline

This adds an edge to the graph. The edges are stored as edge dependencies, hence the semantic of to <- from.

Parameters
toThe 'to' side of the directed dependency.
fromThe 'from' side of the directed dependency.
Returns
A boolean value that can be used to capture additions at file scope.

◆ sort()

template<typename NODE_POLICY >
node_vector_t flecsi::utils::dag< NODE_POLICY >::sort ( )
inline

Topological sort of the DAG using Kahn's algorithm.

Returns
A std::vector<node_t> with a node ordering that respects the DAG dependencies.

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