33 #ifndef IWS_PARAM_FUNCS_EVALUATOR_H 34 #define IWS_PARAM_FUNCS_EVALUATOR_H 49 template <
typename ObservedStateType,
typename OutputStateType,
typename ParamType,
typename... ParamFuncs2StateTypes>
66 template <
typename ParamFuncPtrType>
67 std::shared_ptr<OutputStateType>&
compute(std::shared_ptr<ObservedStateType>& _xObs, ParamFuncPtrType& _paramFuncs,
70 auto& paramFuncs2State =
std::get<Get_Tuple_Index<
71 ParamFuncPtrType, std::tuple<std::shared_ptr<typename ParamFuncs2StateTypes::ParamFuncType>...> >
::value>(
73 auto& stateChDes = paramFuncs2State.compute(_xObs, _paramFuncs, _t);
74 if (paramFuncs2State.finished())
76 paramFuncs2State.reset();
86 template <
typename ParamFuncsType>
90 paramFuncsI.state0ParamFuncs_ = _state0;
91 paramFuncsI.timeShift_ = _timeShift;
101 _paramFuncs2StateI.
reset();
122 #endif // IWS_PARAM_FUNCS_EVALUATOR_H Class manipulating a set of parametric-functions-to-state objects based on requested parametric funct...
std::tuple< ParamFuncs2StateTypes... > paramFuncs2State_
Tuple storing the parametric functions evaluators.
ParamFuncsEvaluator(std::shared_ptr< ParamType > _params)
Helper function needed to upgrade c++ 2011.
bool processingParamFuncs_
Flags if any evaluator is active.
constexpr std::enable_if< II==sizeof...(Tp), void >::type for_each_tuple(std::tuple< Tp... > &, FuncT)
T & get(std::tuple< Args... > &t)
static constexpr auto value
virtual void reloadParam()=0
Reloads class parameters. To be called when parameters that influence the class variables are changed...
virtual void reset()=0
Resets class structures/variables.
std::shared_ptr< OutputStateType > & compute(std::shared_ptr< ObservedStateType > &_xObs, ParamFuncPtrType &_paramFuncs, const double &_t)
Performs a parametric functions evaluator computation step (calling the parametric functions evaluato...
void loadParamFuncsState0(const std::vector< double > &_state0, const double &_timeShift=0)
Loads the initial state into the specific parametric functions evaluators.
void reloadParam()
Calls reloadParam on all parametric functions evaluators.
void reset()
Resets all parametric functions evaluators.