7#include "vipra/types/idx.hpp"
8#include "vipra/vipra_behaviors/random/random.hpp"
10namespace VIPRA::Behaviors {
15using ValueFunc = std::function<VIPRA::f_pnt(VIPRA::seed, VIPRA::idx)>;
23 explicit NumericValue(VIPRA::seed seedNum, ValueFunc func)
24 : _seed(seedNum), _val(std::move(func))
28 [[nodiscard]]
inline auto value(VIPRA::idx pedIdx)
const -> VIPRA::f_pnt
30 return _val(_seed, pedIdx);
38 NumericValue() =
default;
47 inline auto operator()(VIPRA::seed ,
48 VIPRA::idx )
const -> VIPRA::f_pnt
62 inline auto operator()(VIPRA::seed seed, VIPRA::idx pedIdx)
const -> VIPRA::f_pnt
76 inline auto operator()(VIPRA::seed seed, VIPRA::idx pedIdx)
const -> VIPRA::f_pnt
static auto ped_random_float(VIPRA::seed seed, VIPRA::idx pedIdx, Min min, Max max) -> VIPRA::f_pnt
Gets the random VIPRA::f_pnt between min and max that is assigned to the pedestrian at pedIdx.
Definition random.hpp:26
Holds an exact VIPRA::f_pnt value.
Definition numeric_value.hpp:45
Holds a random VIPRA::f_pnt value for each pedestrian.
Definition numeric_value.hpp:58
Holds a random whole number value for each pedestrian.
Definition numeric_value.hpp:72