Utopia  2
Framework for studying models of complex & adaptive systems.
Namespaces | Functions
apply.hh File Reference
#include <type_traits>
#include <boost/graph/graph_traits.hpp>
#include "iterator.hh"
#include "apply.hh"
#include "../apply.hh"
#include "../state.hh"
#include "../zip.hh"
Include dependency graph for apply.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Utopia
 
 Utopia::GraphUtils
 

Functions

template<typename Graph , typename Iter , typename Rule >
void Utopia::GraphUtils::apply_async (Iter it_begin, Iter it_end, Graph &&g, Rule &&rule)
 Apply a rule asynchronously. More...
 
template<typename Iter , typename Graph , typename Rule >
void Utopia::GraphUtils::apply_sync (Iter it_begin, Iter it_end, Graph &&g, Rule &&rule)
 Apply a rule synchronously. More...
 
template<IterateOver iterate_over, Update mode, typename Graph , typename Rule , typename std::enable_if_t< mode==Update::sync, int > = 0>
void Utopia::apply_rule (Rule &&rule, Graph &&g)
 Synchronously apply a rule to graph entities. More...
 
template<IterateOver iterate_over, Update mode, Shuffle shuffle, typename Graph , typename Rule , typename std::enable_if_t< mode==Update::async, int > = 0>
void Utopia::apply_rule (Rule &&rule, Graph &&g)
 Asynchronously apply a rule to graph entities, without shuffling. More...
 
template<IterateOver iterate_over, Update mode, Shuffle shuffle = Shuffle::on, typename Graph , typename Rule , typename RNG , typename std::enable_if_t< mode==Update::async, int > = 0, typename std::enable_if_t< shuffle==Shuffle::on, int > = 0>
void Utopia::apply_rule (Rule &&rule, Graph &&g, RNG &&rng)
 Asynchronously, in shuffled order, apply a rule to graph entities. More...
 
template<IterateOver iterate_over, Update mode, typename Graph , typename Rule , typename VertexDesc = typename boost::graph_traits< std::remove_reference_t<Graph>>::vertex_descriptor, typename std::enable_if_t< mode==Update::sync, int > = 0>
void Utopia::apply_rule (Rule &&rule, const VertexDesc ref_vertex, Graph &&g)
 Synchronously apply a rule to graph entities. More...
 
template<IterateOver iterate_over, Update mode, Shuffle shuffle = Shuffle::on, typename Graph , typename Rule , typename VertexDesc = typename boost::graph_traits< std::remove_reference_t<Graph>>::vertex_descriptor, typename std::enable_if_t< mode==Update::async, int > = 0, typename std::enable_if_t< shuffle==Shuffle::off, int > = 0>
void Utopia::apply_rule (Rule &&rule, const VertexDesc ref_vertex, Graph &&g)
 Asynchronously apply a rule to graph entities, without shuffling. More...
 
template<IterateOver iterate_over, Update mode, Shuffle shuffle = Shuffle::on, typename Graph , typename Rule , typename RNG , typename VertexDesc = typename boost::graph_traits< std::remove_reference_t<Graph>>::vertex_descriptor>
void Utopia::apply_rule (Rule &&rule, const VertexDesc ref_vertex, Graph &&g, RNG &&rng)
 Asynchronously, in shuffled order, apply a rule to graph entities. More...