Time span#

The ponio library provides a class to manage interval of time of simulation in ponio::solve() function for example. This interval may specifies intermediates values where the ponio::time_iterator needs to pass.

template<typename value_t>
class time_span : public std::vector<value_t>#

Class to manage time interval between the start and the end of simulation with optional intermediate values.

Template Parameters:

value_t – type of time

Public Functions

template<typename Container>
time_span(Container const &c)#

Construct a new time span from a container.

Template Parameters:

Container

Parameters:

c

Helper function#

template<typename value_t>
time_span<value_t> ponio::linspace(value_t start, value_t stop, std::size_t num = 50, bool endpoint = true)#

Return evenly spaced numbers over a specified interval.

Template Parameters:

value_t – type of time

Parameters:
  • start – the stating value of the sequence

  • stop – the end value of the sequence

  • num – number of samples to generate

  • endpoint – optional, if true (default) the stop is in the sequence