107 std::size_t ctrlPtsArcRefIdx;
117 FuncCtrlPt(
const double& _val,
double& _arc) : val(_val), arc(_arc)
160 void initBase(
const std::vector<tuw::ParamFuncs::ParamFuncsStructure>& _paramFuncsStructure);
180 void init(
const std::vector<tuw::ParamFuncs::ParamFuncsStructure>& _paramFuncsStructure);
210 double&
funcsArc(
const std::size_t& _i,
const std::size_t& _j);
213 const double&
funcsArc(
const std::size_t& _i,
const std::size_t& _j)
const;
216 FuncCtrlPt&
ctrlPt(
const std::size_t& _funcIdx,
const std::size_t& _funcCtrlPtIdx);
219 const FuncCtrlPt&
ctrlPt(
const std::size_t& _funcIdx,
const std::size_t& _funcCtrlPtIdx)
const;
222 double&
ctrlPtVal(
const std::size_t& _funcIdx,
const std::size_t& _funcCtrlPtIdx,
226 const double&
ctrlPtVal(
const std::size_t& _funcIdx,
const std::size_t& _funcCtrlPtIdx,
266 virtual void setEvalArc(
const double& _funcsArcEval,
270 virtual double computeFuncVal(
const std::size_t& _funcIdx)
const = 0;
290 #endif // PARAM_FUNC_H double & funcsArc(const std::size_t &_i, const std::size_t &_j)
Access to the arc parameter vector at index _i, control point _j.
std::shared_ptr< ParamFuncs > ParamFuncsSPtr
std::vector< FuncEvalModesFlags > funcEvalReq_
Flags for required function computation modes.
std::unique_ptr< ParamFuncs > ParamFuncsUPtr
virtual double computeFuncDiff2(const std::size_t &_funcIdx) const =0
Computes 2nd derivative of parametric function with index _funcIdx at parametric arc set by setEvalAr...
control point arc parameter
double funcsArcBegin_
Arc parametrization at the beginning of the functions domain definitions (common for all functions)...
std::shared_ptr< ParamFuncs const > ParamFuncsConstSPtr
std::vector< std::vector< FuncCtrlPt > > funcCtrlPt_
Stores the control points for all the parametrized functions.
double & funcsArcBegin()
Access to the initial value of the arc parametrization.
constexpr auto asInt(Enumeration const value) -> typename std::underlying_type< Enumeration >::type
double funcsArcEnd_
Arc parametrization at the end of the functions domain definitions (common for all functions)...
std::array< bool, nrModesMax_ > FuncEvalModesFlags
static constexpr const std::size_t nrModesMax_
Maximum number of computation modes (except the parametric function itself FUNC). Currently 4 other c...
virtual double computeFuncDiff1(const std::size_t &_funcIdx) const =0
Computes 1st derivative of parametric function with index _funcIdx at parametric arc set by setEvalAr...
ParamFuncs & operator=(const ParamFuncs &)
void initBase(const std::vector< tuw::ParamFuncs::ParamFuncsStructure > &_paramFuncsStructure)
Initializes the control structure for the base class.
virtual void initImpl()=0
Called at end of init. To be used by extended classes.
double & funcsArcEnd()
Access to the final value of the arc parametrization.
std::vector< std::size_t > func2Arc_
Maps the parametrized functions to their afferent arc parametrizations.
EvalArcGuarantee
Flags if any guarantees about evaluation arc relative to last evaluation arc are present.
double & arc
control point arc parameter
Containts parametric function initialization data.
FuncCtrlPt(const double &_val, double &_arc)
virtual double computeFuncVal(const std::size_t &_funcIdx) const =0
Computes value of parametric function with index _funcIdx at parametric arc set by setEvalArc...
double & ctrlPtVal(const std::size_t &_funcIdx, const std::size_t &_funcCtrlPtIdx, const CtrlPtDim &_ctrlPtDim=CtrlPtDim::VAL)
Access of a parametric function control point dimension.
std::size_t funcsSize() const
Number of parametric functions.
std::size_t funcCtrlPtSize(const std::size_t &_i) const
Number of control points for a parametric function.
std::vector< std::vector< double > > funcCtrlPtArc_
Stores the control points arc parameters for all the parametrized functions.
CtrlPtDim
Control point variable dimension.
double funcsArcEval_
Arc parametrization at the evaluation point (set by setEvalArc)/.
function second derivative
function first derivative
virtual double computeFuncInt1(const std::size_t &_funcIdx) const =0
Computes integral of parametric function with index _funcIdx on interval [funcsArcBegin_, funcsArcEnd_].
function value (always assumed to have the highest integer value of the enum)
virtual double computeFuncInt2(const std::size_t &_funcIdx) const =0
Computes double integral of parametric function with index _funcIdx on interval [funcsArcBegin_, funcsArcEnd_].
FuncEvalMode
Required type of computation relative to the parametric function.
std::size_t funcsArcSize() const
Number of arc parametrizations.
void init(const std::vector< tuw::ParamFuncs::ParamFuncsStructure > &_paramFuncsStructure)
Initializes the control structure.
std::unique_ptr< ParamFuncs const > ParamFuncsConstUPtr
const double & funcsArcEval() const
Const access to the active evaluation point arc parametrization.
virtual void precompute()=0
Precomputes cached data.
virtual ~ParamFuncs()=default
void shiftStartCtrlPt(const double &_dt)
double val
control point value
this evaluation arc is at the arc parametrization begin
virtual void setEvalArc(const double &_funcsArcEval, const EvalArcGuarantee &_evalArcGuarantee=EvalArcGuarantee::NONE)=0
Sets parametric function evaluation arc.
this evaluation arc is at the arc parametrization end
std::vector< ParamFuncsStructure > paramFuncsStructure_
Initialization structure "store" variable.
FuncCtrlPt & ctrlPt(const std::size_t &_funcIdx, const std::size_t &_funcCtrlPtIdx)
Access of a parametric function control point.
Storage and manipulation of parametric functions collection.