Dynamical System Framework
Loading...
Searching...
No Matches
dsf::Dynamics< network_t > Class Template Reference

The Dynamics class represents the dynamics of the network. More...

#include <Dynamics.hpp>

Public Member Functions

 Dynamics (network_t &&graph, std::optional< unsigned int > seed=std::nullopt)
 Construct a new Dynamics object.
void setSeed (unsigned int const seed) noexcept
 Set the seed for the random number generator.
void setConcurrency (std::size_t const concurrency)
 Set the maximum number of threads to use for parallel execution.
auto concurrency () const
 Get the current concurrency (number of threads configured in the task arena).
auto const & graph () const
 Get the graph.
auto & graph ()
 Get the graph (mutable).
auto time_step () const
 Get the current simulation time-step.

Protected Member Functions

void m_evolve ()

Protected Attributes

std::unique_ptr< network_t > m_graph
tbb::task_arena m_taskArena
std::mt19937_64 m_generator

Detailed Description

template<typename network_t>
class dsf::Dynamics< network_t >

The Dynamics class represents the dynamics of the network.

Template Parameters
network_tThe type of the network

Constructor & Destructor Documentation

◆ Dynamics()

template<typename network_t>
dsf::Dynamics< network_t >::Dynamics ( network_t && graph,
std::optional< unsigned int > seed = std::nullopt )

Construct a new Dynamics object.

Parameters
graphThe graph representing the network
seedThe seed for the random number generator (default is std::nullopt)

Member Function Documentation

◆ concurrency()

template<typename network_t>
auto dsf::Dynamics< network_t >::concurrency ( ) const
inline

Get the current concurrency (number of threads configured in the task arena).

Returns
std::size_t, The current concurrency

◆ graph() [1/2]

template<typename network_t>
auto & dsf::Dynamics< network_t >::graph ( )
inline

Get the graph (mutable).

Returns
network_t&, The graph

◆ graph() [2/2]

template<typename network_t>
auto const & dsf::Dynamics< network_t >::graph ( ) const
inline

Get the graph.

Returns
const network_t&, The graph

◆ setConcurrency()

template<typename network_t>
void dsf::Dynamics< network_t >::setConcurrency ( std::size_t const concurrency)

Set the maximum number of threads to use for parallel execution.

Parameters
concurrencyThe maximum number of threads to use for parallel execution

◆ setSeed()

template<typename network_t>
void dsf::Dynamics< network_t >::setSeed ( unsigned int const seed)
inlinenoexcept

Set the seed for the random number generator.

Parameters
seedThe seed to set

◆ time_step()

template<typename network_t>
auto dsf::Dynamics< network_t >::time_step ( ) const
inline

Get the current simulation time-step.

Returns
std::time_t, The current simulation time-step

The documentation for this class was generated from the following file:
  • src/dsf/base/Dynamics.hpp