Runtime parameters#
#include <heyoka/param.hpp>
The param
class#
-
class param#
This class is used to represent numerical parameters in heyoka’s expression system.
A parameter is a constant whose value, unlike
number
, is not fixed at the time of the creation of a symbolic expression. Instead, the value of a parameter is loaded at a later stage (e.g., during the numerical integration of a system of ODEs) from a user-supplied array of parameter values. Parameters are uniquely identified by a zero-based index representing the position in the array of parameter values from which the value of the parameter will be loaded.A tutorial illustrating the use of this class is available.
-
param() noexcept#
Default constructor.
The default constructor initialises a parameter with index 0.
-
explicit param(std::uint32_t idx) noexcept#
Constructor from index.
- Parameters:
idx – the index value for the parameter.
-
~param()#
Parameters are copy/move constructible, copy/move assignable and destructible.
-
[[nodiscard]] std::uint32_t idx() const noexcept#
Index getter.
- Returns:
the index value of the parameter.
-
param() noexcept#
Functions#
Operators#
Standard library specialisations#
-
template<>
struct std::hash<heyoka::param># Specialisation of
std::hash
forheyoka::param
.-
std::size_t operator()(const heyoka::param &p) const noexcept#
- Parameters:
p – the input
heyoka::param
.- Returns:
a hash value for p.
-
std::size_t operator()(const heyoka::param &p) const noexcept#