GraphSimulationStochastic< FP, Graph > Class Template Reference

CPP API: mio::GraphSimulationStochastic< FP, Graph > Class Template Reference
mio::GraphSimulationStochastic< FP, Graph > Class Template Reference

#include <graph_simulation.h>

Inheritance diagram for mio::GraphSimulationStochastic< FP, Graph >:
Collaboration diagram for mio::GraphSimulationStochastic< FP, Graph >:

Public Member Functions

void advance (FP t_max)
 
RandomNumberGenerator & get_rng ()
 
 GraphSimulationStochastic (FP t0, FP dt, const Graph &g, const node_function &node_func, const edge_function &&edge_func)
 
 GraphSimulationStochastic (FP t0, FP dt, Graph &&g, const node_function &node_func, const edge_function &&edge_func)
 
- Public Member Functions inherited from mio::GraphSimulationBase< Graph, FP, FP, std::function< void(Graph::EdgeProperty &, size_t, Graph::NodeProperty &, Graph::NodeProperty &)>, std::function< void(FP, FP, Graph::NodeProperty &)> >
Graphget_graph () &
 
Graph && get_graph () &&
 
const Graphget_graph () const &
 
FP get_t () const
 
 GraphSimulationBase (FP t0, FP dt, const Graph &g, const node_function &node_func, const edge_function &&edge_func)
 
 GraphSimulationBase (FP t0, FP dt, Graph &&g, const node_function &node_func, const edge_function &&edge_func)
 

Private Types

using Base = GraphSimulationBase< Graph, FP, FP, std::function< void(typename Graph::EdgeProperty &, size_t, typename Graph::NodeProperty &, typename Graph::NodeProperty &)>, std::function< void(FP, FP, typename Graph::NodeProperty &)> >
 
using edge_function = typename Base::edge_function
 
using node_function = typename Base::node_function
 

Private Member Functions

FP get_cumulative_transition_rate ()
 
void get_rates (std::vector< FP > &rates)
 

Private Attributes

std::vector< FP > m_rates
 
RandomNumberGenerator m_rng
 

Additional Inherited Members

- Public Types inherited from mio::GraphSimulationBase< Graph, FP, FP, std::function< void(Graph::EdgeProperty &, size_t, Graph::NodeProperty &, Graph::NodeProperty &)>, std::function< void(FP, FP, Graph::NodeProperty &)> >
using edge_function = std::function< void(Graph::EdgeProperty &, size_t, Graph::NodeProperty &, Graph::NodeProperty &)>
 
using Graph = Graph
 
using node_function = std::function< void(FP, FP, Graph::NodeProperty &)>
 
- Protected Attributes inherited from mio::GraphSimulationBase< Graph, FP, FP, std::function< void(Graph::EdgeProperty &, size_t, Graph::NodeProperty &, Graph::NodeProperty &)>, std::function< void(FP, FP, Graph::NodeProperty &)> >
FP m_dt
 
edge_function m_edge_func
 
Graph m_graph
 
node_function m_node_func
 
FP m_t
 

Member Typedef Documentation

◆ Base

template<typename FP , class Graph >
using mio::GraphSimulationStochastic< FP, Graph >::Base = GraphSimulationBase<Graph, FP, FP, std::function<void(typename Graph::EdgeProperty&, size_t, typename Graph::NodeProperty&, typename Graph::NodeProperty&)>, std::function<void(FP, FP, typename Graph::NodeProperty&)> >
private

◆ edge_function

template<typename FP , class Graph >
using mio::GraphSimulationStochastic< FP, Graph >::edge_function = typename Base::edge_function
private

◆ node_function

template<typename FP , class Graph >
using mio::GraphSimulationStochastic< FP, Graph >::node_function = typename Base::node_function
private

Constructor & Destructor Documentation

◆ GraphSimulationStochastic() [1/2]

template<typename FP , class Graph >
mio::GraphSimulationStochastic< FP, Graph >::GraphSimulationStochastic ( FP  t0,
FP  dt,
const Graph g,
const node_function node_func,
const edge_function &&  edge_func 
)
inline

◆ GraphSimulationStochastic() [2/2]

template<typename FP , class Graph >
mio::GraphSimulationStochastic< FP, Graph >::GraphSimulationStochastic ( FP  t0,
FP  dt,
Graph &&  g,
const node_function node_func,
const edge_function &&  edge_func 
)
inline

Member Function Documentation

◆ advance()

template<typename FP , class Graph >
void mio::GraphSimulationStochastic< FP, Graph >::advance ( FP  t_max)
inline

◆ get_cumulative_transition_rate()

template<typename FP , class Graph >
FP mio::GraphSimulationStochastic< FP, Graph >::get_cumulative_transition_rate ( )
inlineprivate

◆ get_rates()

template<typename FP , class Graph >
void mio::GraphSimulationStochastic< FP, Graph >::get_rates ( std::vector< FP > &  rates)
inlineprivate

◆ get_rng()

template<typename FP , class Graph >
RandomNumberGenerator& mio::GraphSimulationStochastic< FP, Graph >::get_rng ( )
inline

Member Data Documentation

◆ m_rates

template<typename FP , class Graph >
std::vector<FP> mio::GraphSimulationStochastic< FP, Graph >::m_rates
private

◆ m_rng

template<typename FP , class Graph >
RandomNumberGenerator mio::GraphSimulationStochastic< FP, Graph >::m_rng
private