Dynamical system model
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 setName (const std::string &name)
 Set the name of the simulation.
void setInitTime (std::time_t timeEpoch)
 Set the initial time as epoch time.
void connectDataBase (std::string const &dbPath)
auto const & graph () const
 Get the graph.
auto const & id () const
 Get the id of the simulation.
auto const & name () const
 Get the name of the simulation.
auto const & database () const
 Get the database connection (const version).
auto & database ()
 Get the database connection (mutable version for writing).
auto time () const
 Get the current simulation time as epoch time.
auto time_step () const
 Get the current simulation time-step.
auto strDateTime () const
 Get the current simulation time as formatted string (YYYY-MM-DD HH:MM:SS).

Protected Member Functions

void m_evolve ()
auto m_safeDateTime () const
 Get a safe date-time string for filenames (YYYYMMDD_HHMMSS).
auto m_safeName () const
 Get a safe name string for filenames (spaces replaced by underscores).

Protected Attributes

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

◆ database() [1/2]

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

Get the database connection (mutable version for writing).

Returns
std::unique_ptr<SQLite::Database>&, The database connection

◆ database() [2/2]

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

Get the database connection (const version).

Returns
const std::unique_ptr<SQLite::Database>&, The database connection

◆ graph()

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

Get the graph.

Returns
const network_t&, The graph

◆ id()

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

Get the id of the simulation.

Returns
const Id&, The id of the simulation

◆ m_safeDateTime()

template<typename network_t>
auto dsf::Dynamics< network_t >::m_safeDateTime ( ) const
inlineprotected

Get a safe date-time string for filenames (YYYYMMDD_HHMMSS).

Returns
std::string, The safe date-time string

◆ m_safeName()

template<typename network_t>
auto dsf::Dynamics< network_t >::m_safeName ( ) const
inlineprotected

Get a safe name string for filenames (spaces replaced by underscores).

Returns
std::string, The safe name string

◆ name()

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

Get the name of the simulation.

Returns
const std::string&, The name of the simulation

◆ setInitTime()

template<typename network_t>
void dsf::Dynamics< network_t >::setInitTime ( std::time_t timeEpoch)
inline

Set the initial time as epoch time.

Parameters
timeEpochThe initial time as epoch time

◆ setName()

template<typename network_t>
void dsf::Dynamics< network_t >::setName ( const std::string & name)
inline

Set the name of the simulation.

Parameters
nameThe name of the simulation

◆ strDateTime()

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

Get the current simulation time as formatted string (YYYY-MM-DD HH:MM:SS).

Returns
std::string, The current simulation time as formatted string

◆ time()

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

Get the current simulation time as epoch time.

Returns
std::time_t, The current simulation time as epoch time

◆ 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