time_series_functor.h Source File
|
CPP API
|
time_series_functor.h
Go to the documentation of this file.
63 assert(m_data.get_num_time_points() > 0 && "Need at least one time point for LinearInterpolation.");
64 assert(m_data.get_num_elements() == 1 && "LinearInterpolation requires exactly one value per time point.");
Definition: time_series_functor.h:47
TimeSeriesFunctor()
Creates a Zero functor.
Definition: time_series_functor.h:87
FP operator()(FP time) const
Function returning a scalar value.
Definition: time_series_functor.h:97
TimeSeries< FP > m_data
Data used by the functor to compute its values. Its shape depends on type.
Definition: time_series_functor.h:116
TimeSeriesFunctor(TimeSeriesFunctorType type, const TimeSeries< FP > &data)
Creates a functor using the given data.
Definition: time_series_functor.h:55
TimeSeriesFunctor(TimeSeriesFunctorType type, std::vector< std::vector< FP >> &&table)
Creates a functor using the given table.
Definition: time_series_functor.h:79
auto default_serialize()
This method is used by the default serialization feature.
Definition: time_series_functor.h:109
TimeSeriesFunctorType m_type
Determines what kind of functor this is, e.g. linear interpolation.
Definition: time_series_functor.h:115
stores vectors of values at time points (or some other abstract variable) the value at each time poin...
Definition: time_series.h:58
A collection of classes to simplify handling of matrix shapes in meta programming.
Definition: models/abm/analyze_result.h:30
auto linear_interpolation(const X &x_eval, const X &x_1, const X &x_2, const V &y1, const V &y2)
Linear interpolation between two data values.
Definition: interpolation.h:44
TimeSeriesFunctorType
Type of a TimeSeriesFunctor.
Definition: time_series_functor.h:41
@ LinearInterpolation
Members< ValueTypes..., T > add(const char *member_name, T &member)
Add a class member.
Definition: default_serialize.h:139
Generated by