Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize > Class Template Reference

#include <param_func_spline0_dist.h>

Inheritance diagram for tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >:
Inheritance graph
[legend]

Classes

struct  FuncCacheData
 Structure referencing a control point and storing cached relevant function evaluation data (derivatives, integrals etc.). More...
 

Public Types

using NumType = TNumType
 
- Public Types inherited from tuw::ParamFuncsBase< ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, TNumType, TFuncSize, TArcLatticeSize >
using NumType = TNumType
 
using ParamFuncsBaseType = ParamFuncsBase< ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, TNumType, TFuncSize, TArcLatticeSize >
 
- Public Types inherited from tuw::ParamFuncsDistBase< ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, TNumType >
using NumType = TNumType
 
using ParramFuncsDistBaseType = ParamFuncsDistBase< ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, TNumType >
 
- Public Types inherited from tuw::ParamFuncsDist
enum  TraveledDistCfMode { TraveledDistCfMode::NONE, TraveledDistCfMode::V, TraveledDistCfMode::AV }
 Required type of traveled distance computation relative to the parametric function. More...
 
- Public Types inherited from tuw::ParamFuncs
enum  CtrlPtDim { CtrlPtDim::VAL, CtrlPtDim::ARC }
 Control point variable dimension. More...
 
enum  EvalArcGuarantee {
  EvalArcGuarantee::NONE, EvalArcGuarantee::AFTER_LAST, EvalArcGuarantee::BEFORE_LAST, EvalArcGuarantee::AT_BEGIN,
  EvalArcGuarantee::AT_END
}
 Flags if any guarantees about evaluation arc relative to last evaluation arc are present. More...
 
enum  FuncEvalMode {
  FuncEvalMode::DIFF1, FuncEvalMode::DIFF2, FuncEvalMode::INT1, FuncEvalMode::INT2,
  FuncEvalMode::FUNC, FuncEvalMode::ENUM_SIZE
}
 Required type of computation relative to the parametric function. More...
 
using FuncEvalModesFlags = std::array< bool, nrModesMax_ >
 

Public Member Functions

virtual double computeFuncDiff1 (const std::size_t &_funcIdx) const override
 Computes 1st derivative of parametric function with index _funcIdx at parametric arc set by setEvalArc. More...
 
TNumType computeFuncDiff1Impl (const std::size_t &_funcIdx) const
 
virtual double computeFuncDiff2 (const std::size_t &_funcIdx) const override
 Computes 2nd derivative of parametric function with index _funcIdx at parametric arc set by setEvalArc. More...
 
TNumType computeFuncDiff2Impl (const std::size_t &_funcIdx) const
 
virtual double computeFuncInt1 (const std::size_t &_funcIdx) const override
 Computes integral of parametric function with index _funcIdx on interval [funcsArcBegin_, funcsArcEnd_]. More...
 
TNumType computeFuncInt1Impl (const std::size_t &_funcIdx) const
 
virtual double computeFuncInt2 (const std::size_t &_funcIdx) const override
 Computes double integral of parametric function with index _funcIdx on interval [funcsArcBegin_, funcsArcEnd_]. More...
 
TNumType computeFuncInt2Impl (const std::size_t &_funcIdx) const
 
virtual double computeFuncVal (const std::size_t &_funcIdx) const override
 Computes value of parametric function with index _funcIdx at parametric arc set by setEvalArc. More...
 
TNumType computeFuncValImpl (const std::size_t &_funcIdx) const
 
double computeS () const override
 
void computeS2TLattice (const std::vector< double > &_sLattice, std::vector< double > &_tLattice) override
 Computes arc parametrization lattice given a distance-parametrized lattice. More...
 
void computeS2TLattice (const double &_arc0, const double &_ds, std::vector< double > &_tLattice) override
 Computes arc parametrization lattice given an inital arc and distance parametrized sampling interval. More...
 
void computeS2TLatticeImpl (const std::vector< TNumType > &_sLattice, std::vector< TNumType > &_tLattice)
 
void computeS2TLatticeImpl (const TNumType &_arc0, const TNumType &_ds, std::vector< TNumType > &_tLattice)
 
TNumType computeSImpl () const
 
double computeT (const double &_s, const EvalArcGuarantee &_evalArcGuarantee=EvalArcGuarantee::NONE) override
 
TNumType computeTImpl (const TNumType &_s, const EvalArcGuarantee &_evalArcGuarantee)
 
ParamFuncsSpline0Distoperator= (const ParamFuncsSpline0Dist &)
 
ParamFuncsSpline0Distoperator= (ParamFuncsSpline0Dist &&)=delete
 
ParamFuncsSpline0Distoperator= (const ParamFuncsSpline0Dist &_other)
 
ParamFuncsSpline0Distoperator= (ParamFuncsSpline0Dist &&)=delete
 
 ParamFuncsSpline0Dist ()=default
 
 ParamFuncsSpline0Dist (const ParamFuncsSpline0Dist &)
 
 ParamFuncsSpline0Dist (ParamFuncsSpline0Dist &&)=delete
 
 ParamFuncsSpline0Dist ()=default
 
 ParamFuncsSpline0Dist (const ParamFuncsSpline0Dist &_other)
 
 ParamFuncsSpline0Dist (ParamFuncsSpline0Dist &&)=delete
 
virtual void precompute () override
 Precomputes cached data. To be called after ANY control point modifications. More...
 
void precomputeImpl ()
 Precomputes cached data. To be called after ANY control point modifications. More...
 
void setDistCfMode (TraveledDistCfMode _distCfMode, const std::vector< std::size_t > &_distRelFuncIdx) override
 
void setDistCfModeImpl (TraveledDistCfMode _distCfMode, const std::vector< std::size_t > &_distRelFuncIdx)
 
void setEvalArc (const double &_funcsArcEval, const EvalArcGuarantee &_evalArcGuarantee=EvalArcGuarantee::NONE) override
 Sets parametric function evaluation arc. More...
 
void setEvalArcImpl (const TNumType &_arcEval, const EvalArcGuarantee &_eAG)
 
void setEvalDist (const double &_funcsDistEval, const EvalArcGuarantee &_evalArcGuarantee=EvalArcGuarantee::NONE) override
 Moves to evaluation arc at which the traveled distance _funcsDistEval is achieved. More...
 
void setEvalDistImpl (const TNumType &_funcsDistEval, const EvalArcGuarantee &_evalArcGuarantee)
 
virtual ~ParamFuncsSpline0Dist ()=default
 
virtual ~ParamFuncsSpline0Dist ()=default
 
- Public Member Functions inherited from tuw::ParamFuncsBase< ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, TNumType, TFuncSize, TArcLatticeSize >
ParamFuncsBaseoperator= (const ParamFuncsBase &_other)
 
ParamFuncsBaseoperator= (ParamFuncsBase &&)=default
 
 ParamFuncsBase ()
 
 ParamFuncsBase (const ParamFuncsBase &_other)
 
 ParamFuncsBase (ParamFuncsBase &&)=default
 
virtual ~ParamFuncsBase ()=default
 
- Public Member Functions inherited from tuw::ParamFuncsBaseCRTP< ParamFuncsBase< ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, TNumType, TFuncSize, TArcLatticeSize > >
NumType computeFuncDiff1 (const std::size_t &_funcIdx) const
 Computes 1st derivative of parametric function with index _funcIdx at parametric arc set by setEvalArc. More...
 
NumType computeFuncDiff2 (const std::size_t &_funcIdx) const
 Computes 2nd derivative of parametric function with index _funcIdx at parametric arc set by setEvalArc. More...
 
NumType computeFuncInt1 (const std::size_t &_funcIdx) const
 Computes integral of parametric function with index _funcIdx on interval [funcsArcBegin_, funcsArcEnd_]. More...
 
NumType computeFuncInt2 (const std::size_t &_funcIdx) const
 Computes double integral of parametric function with index _funcIdx on interval [funcsArcBegin_, funcsArcEnd_]. More...
 
NumType computeFuncVal (const std::size_t &_funcIdx) const
 Computes value of parametric function with index _funcIdx at parametric arc set by setEvalArc. More...
 
FuncCtrlPtTypectrlPt (const std::size_t &_funcIdx, const std::size_t &_funcCtrlPtIdx)
 Access of a parametric function control point. More...
 
const FuncCtrlPtTypectrlPt (const std::size_t &_funcIdx, const std::size_t &_funcCtrlPtIdx) const
 Const access of a parametric function control point. More...
 
NumTypectrlPtVal (const std::size_t &_funcIdx, const std::size_t &_funcCtrlPtIdx, const CtrlPtDim &_ctrlPtDim=CtrlPtDim::VAL)
 Access of a parametric function control point dimension. More...
 
const NumTypectrlPtVal (const std::size_t &_funcIdx, const std::size_t &_funcCtrlPtIdx, const CtrlPtDim &_ctrlPtDim=CtrlPtDim::VAL) const
 Const of a parametric function control point dimension. More...
 
std::size_t funcCtrlPtSize (const std::size_t &_i) const
 Number of control points for a parametric function. More...
 
NumTypefuncsArc (const std::size_t &_i, const std::size_t &_j)
 Access to the arc parameter vector at index _i, control point _j. More...
 
const NumTypefuncsArc (const std::size_t &_i, const std::size_t &_j) const
 Const access the arc parameter vector at index _i, control point _j. More...
 
NumTypefuncsArcBegin ()
 Access to the initial value of the arc parametrization. More...
 
const NumTypefuncsArcBegin () const
 Const access to the initial value of the arc parametrization. More...
 
NumTypefuncsArcEnd ()
 Access to the final value of the arc parametrization. More...
 
const NumTypefuncsArcEnd () const
 Const access to the finall value of the arc parametrization. More...
 
const NumTypefuncsArcEval () const
 Const access to the active evaluation point arc parametrization. More...
 
std::size_t funcsArcSize () const
 Number of arc parametrizations. More...
 
std::size_t funcsArcSize (const std::size_t &_i) const
 Number of control points of parametrization _i. More...
 
std::size_t funcsSize () const
 Number of parametric functions. More...
 
void init (const TParamFucsStructVecArr &_paramFuncsStructure)
 Initializes the control structure. More...
 
ParamFuncsBaseCRTPoperator= (const ParamFuncsBaseCRTP &)=default
 
ParamFuncsBaseCRTPoperator= (ParamFuncsBaseCRTP &&)=default
 
 ParamFuncsBaseCRTP ()=default
 
 ParamFuncsBaseCRTP (const ParamFuncsBaseCRTP &)=default
 
 ParamFuncsBaseCRTP (ParamFuncsBaseCRTP &&)=default
 
void precompute ()
 Precomputes cached data. More...
 
void setEvalArc (const NumType &_arcEval, const eAG &_eAG=eAG::NONE)
 Sets parametric function evaluation arc. More...
 
void shiftStartCtrlPt (const NumType &_dt)
 
 ~ParamFuncsBaseCRTP ()=default
 
- Public Member Functions inherited from tuw::ParamFuncsBaseVirt< TNumType >
TNumType computeFuncDiff1 (const std::size_t &_funcIdx) const
 Computes 1st derivative of parametric function with index _funcIdx at parametric arc set by setEvalArc. More...
 
TNumType computeFuncDiff2 (const std::size_t &_funcIdx) const
 Computes 2nd derivative of parametric function with index _funcIdx at parametric arc set by setEvalArc. More...
 
TNumType computeFuncInt1 (const std::size_t &_funcIdx) const
 Computes integral of parametric function with index _funcIdx on interval [funcsArcBegin_, funcsArcEnd_]. More...
 
TNumType computeFuncInt2 (const std::size_t &_funcIdx) const
 Computes double integral of parametric function with index _funcIdx on interval [funcsArcBegin_, funcsArcEnd_]. More...
 
TNumType computeFuncVal (const std::size_t &_funcIdx) const
 Computes value of parametric function with index _funcIdx at parametric arc set by setEvalArc. More...
 
FuncCtrlPtTypectrlPt (const std::size_t &_funcIdx, const std::size_t &_funcCtrlPtIdx)
 Access of a parametric function control point. More...
 
const FuncCtrlPtTypectrlPt (const std::size_t &_funcIdx, const std::size_t &_funcCtrlPtIdx) const
 Const access of a parametric function control point. More...
 
TNumType & ctrlPtVal (const std::size_t &_funcIdx, const std::size_t &_funcCtrlPtIdx, const CtrlPtDim &_ctrlPtDim=CtrlPtDim::VAL)
 Access of a parametric function control point dimension. More...
 
const TNumType & ctrlPtVal (const std::size_t &_funcIdx, const std::size_t &_funcCtrlPtIdx, const CtrlPtDim &_ctrlPtDim=CtrlPtDim::VAL) const
 Const of a parametric function control point dimension. More...
 
std::size_t funcCtrlPtSize (const std::size_t &_i) const
 Number of control points for a parametric function. More...
 
TNumType & funcsArc (const std::size_t &_i, const std::size_t &_j)
 Access to the arc parameter vector at index _i, control point _j. More...
 
const TNumType & funcsArc (const std::size_t &_i, const std::size_t &_j) const
 Const access the arc parameter vector at index _i, control point _j. More...
 
TNumType & funcsArcBegin ()
 Access to the initial value of the arc parametrization. More...
 
const TNumType & funcsArcBegin () const
 Const access to the initial value of the arc parametrization. More...
 
TNumType & funcsArcEnd ()
 Access to the final value of the arc parametrization. More...
 
const TNumType & funcsArcEnd () const
 Const access to the finall value of the arc parametrization. More...
 
const TNumType & funcsArcEval () const
 Const access to the active evaluation point arc parametrization. More...
 
std::size_t funcsArcSize () const
 Number of arc parametrizations. More...
 
std::size_t funcsArcSize (const std::size_t &_i) const
 Number of control points of parametrization _i. More...
 
std::size_t funcsSize () const
 Number of parametric functions. More...
 
void init (const std::vector< ParamFuncsStructure > &_paramFuncsStructure)
 Initializes the control structure. More...
 
ParamFuncsBaseVirtoperator= (const ParamFuncsBaseVirt &)=default
 
ParamFuncsBaseVirtoperator= (ParamFuncsBaseVirt &&)=default
 
 ParamFuncsBaseVirt ()=default
 
 ParamFuncsBaseVirt (const ParamFuncsBaseVirt &)=default
 
 ParamFuncsBaseVirt (ParamFuncsBaseVirt &&)=default
 
void precompute ()
 Precomputes cached data. More...
 
void setEvalArc (const TNumType &_arcEval, const eAG &_eAG=eAG::NONE)
 Sets parametric function evaluation arc. More...
 
void shiftStartCtrlPt (const TNumType &_dt)
 
virtual ~ParamFuncsBaseVirt ()=default
 
- Public Member Functions inherited from tuw::ParamFuncsDistBase< ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, TNumType >
ParamFuncsDistBaseoperator= (const ParamFuncsDistBase &)=default
 
ParamFuncsDistBaseoperator= (ParamFuncsDistBase &&)=delete
 
 ParamFuncsDistBase ()=default
 
 ParamFuncsDistBase (const ParamFuncsDistBase &)=default
 
 ParamFuncsDistBase (ParamFuncsDistBase &&)=delete
 
virtual ~ParamFuncsDistBase ()=default
 
- Public Member Functions inherited from tuw::ParamFuncsDistBaseCRTP< ParamFuncsDistBase< ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, TNumType > >
NumType computeS () const
 
void computeS2TLattice (const std::vector< NumType > &_sLattice, std::vector< NumType > &_tLattice)
 Computes arc parametrization lattice given a distance-parametrized lattice. More...
 
void computeS2TLattice (const NumType &_arc0, const NumType &_ds, std::vector< NumType > &_tLattice)
 Computes arc parametrization lattice given an inital arc and distance parametrized sampling interval. More...
 
NumType computeT (const NumType &_s, const EvalArcGuarantee &_eAG=EvalArcGuarantee::NONE)
 
ParamFuncsDistBaseCRTPoperator= (const ParamFuncsDistBaseCRTP &)=default
 
ParamFuncsDistBaseCRTPoperator= (ParamFuncsDistBaseCRTP &&)=delete
 
 ParamFuncsDistBaseCRTP ()=default
 
 ParamFuncsDistBaseCRTP (const ParamFuncsDistBaseCRTP &)=default
 
 ParamFuncsDistBaseCRTP (ParamFuncsDistBaseCRTP &&)=delete
 
void setDistCfMode (TraveledDistCfMode _distCfMode, const std::vector< std::size_t > &_distRelFuncIdx)
 Initializer of the Closed form distance computation mode. More...
 
void setEvalDist (const NumType &_funcsDistEval, const EvalArcGuarantee &_eAG=EvalArcGuarantee::NONE)
 Moves to evaluation arc at which the traveled distance _funcsDistEval is achieved. More...
 
 ~ParamFuncsDistBaseCRTP ()=default
 
- Public Member Functions inherited from tuw::ParamFuncsDistBaseVirt< TNumType >
TNumType computeS () const
 
void computeS2TLattice (const std::vector< TNumType > &_sLattice, std::vector< TNumType > &_tLattice)
 Computes arc parametrization lattice given a distance-parametrized lattice. More...
 
void computeS2TLattice (const TNumType &_arc0, const TNumType &_ds, std::vector< TNumType > &_tLattice)
 Computes arc parametrization lattice given an inital arc and distance parametrized sampling interval. More...
 
TNumType computeT (const TNumType &_s, const EvalArcGuarantee &_eAG=EvalArcGuarantee::NONE)
 
ParamFuncsDistBaseVirtoperator= (const ParamFuncsDistBaseVirt &)=default
 
ParamFuncsDistBaseVirtoperator= (ParamFuncsDistBaseVirt &&)=delete
 
 ParamFuncsDistBaseVirt ()=default
 
 ParamFuncsDistBaseVirt (const ParamFuncsDistBaseVirt &)=default
 
 ParamFuncsDistBaseVirt (ParamFuncsDistBaseVirt &&)=delete
 
void setDistCfMode (TraveledDistCfMode _distCfMode, const std::vector< std::size_t > &_distRelFuncIdx)
 Initializer of the Closed form distance computation mode. More...
 
void setEvalDist (const TNumType &_funcsDistEval, const EvalArcGuarantee &_eAG=EvalArcGuarantee::NONE)
 Moves to evaluation arc at which the traveled distance _funcsDistEval is achieved. More...
 
virtual ~ParamFuncsDistBaseVirt ()=default
 
- Public Member Functions inherited from tuw::ParamFuncsDist
ParamFuncsDistoperator= (const ParamFuncsDist &_other)=default
 
ParamFuncsDistoperator= (ParamFuncsDist &&)=delete
 
 ParamFuncsDist ()=default
 
 ParamFuncsDist (const ParamFuncsDist &_other)=default
 
 ParamFuncsDist (ParamFuncsDist &&)=delete
 
virtual void setDistCfMode (TraveledDistCfMode _distCfMode, const std::vector< std::size_t > &_distRelFuncIdx)=0
 Initializer of the Closed form distance computation mode. More...
 
virtual ~ParamFuncsDist ()=default
 
- Public Member Functions inherited from tuw::ParamFuncs
FuncCtrlPtctrlPt (const std::size_t &_funcIdx, const std::size_t &_funcCtrlPtIdx)
 Access of a parametric function control point. More...
 
const FuncCtrlPtctrlPt (const std::size_t &_funcIdx, const std::size_t &_funcCtrlPtIdx) const
 Const access of a parametric function control point. More...
 
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. More...
 
const double & ctrlPtVal (const std::size_t &_funcIdx, const std::size_t &_funcCtrlPtIdx, const CtrlPtDim &_ctrlPtDim=CtrlPtDim::VAL) const
 Const of a parametric function control point dimension. More...
 
std::size_t funcCtrlPtSize (const std::size_t &_i) const
 Number of control points for a parametric function. More...
 
double & funcsArc (const std::size_t &_i, const std::size_t &_j)
 Access to the arc parameter vector at index _i, control point _j. More...
 
const double & funcsArc (const std::size_t &_i, const std::size_t &_j) const
 Const access the arc parameter vector at index _i, control point _j. More...
 
double & funcsArcBegin ()
 Access to the initial value of the arc parametrization. More...
 
const double & funcsArcBegin () const
 Const access to the initial value of the arc parametrization. More...
 
double & funcsArcEnd ()
 Access to the final value of the arc parametrization. More...
 
const double & funcsArcEnd () const
 Const access to the finall value of the arc parametrization. More...
 
const double & funcsArcEval () const
 Const access to the active evaluation point arc parametrization. More...
 
std::size_t funcsArcSize () const
 Number of arc parametrizations. More...
 
std::size_t funcsArcSize (const std::size_t &_i) const
 Number of control points of parametrization _i. More...
 
std::size_t funcsSize () const
 Number of parametric functions. More...
 
void init (const std::vector< tuw::ParamFuncs::ParamFuncsStructure > &_paramFuncsStructure)
 Initializes the control structure. More...
 
ParamFuncsoperator= (const ParamFuncs &)
 
ParamFuncsoperator= (ParamFuncs &&)=delete
 
 ParamFuncs ()=default
 
 ParamFuncs (const ParamFuncs &)
 
 ParamFuncs (ParamFuncs &&)=delete
 
void shiftStartCtrlPt (const double &_dt)
 
virtual ~ParamFuncs ()=default
 

Static Public Member Functions

static double computeDeltaS_V_AV (const double &_dt, const double &_v0, const double &_av)
 Helper function that computes deltaS (from the evalArc_ position) operating on one function control point interval (used by TraveledDistCfMode::V and TraveledDistCfMode::AV modes). More...
 
static TNumType computeDeltaS_V_AV (const TNumType &_dt, const TNumType &_v0, const TNumType &_av)
 Helper function that computes deltaS (from the evalArc_ position) operating on one function control point interval (used by TraveledDistCfMode::V and TraveledDistCfMode::AV modes). More...
 
static double computeDeltaT_V_AV (const double &_ds, const double &_v0, const double &_av)
 Helper function that computes deltaT (from the evalArc_ position) operating on one function control point interval (used by TraveledDistCfMode::V and TraveledDistCfMode::AV modes). More...
 
static TNumType computeDeltaT_V_AV (const TNumType &_ds, const TNumType &_v0, const TNumType &_av)
 Helper function that computes deltaT (from the evalArc_ position) operating on one function control point interval (used by TraveledDistCfMode::V and TraveledDistCfMode::AV modes). More...
 

Protected Member Functions

virtual void initImpl () override
 Called at end of init. To be used by extended classes. More...
 
template<bool FuncDyn = (IsFuncDyn), bool ArcDyn = IsArcDyn, typename std::enable_if<(FuncDyn)&&(ArcDyn)>::type * = nullptr>
void initImplImpl ()
 
template<bool FuncDyn = (IsFuncDyn), bool ArcDyn = IsArcDyn, typename std::enable_if<(!FuncDyn)&&(ArcDyn)>::type * = nullptr>
void initImplImpl ()
 
template<bool FuncDyn = (IsFuncDyn), bool ArcDyn = IsArcDyn, typename std::enable_if<(FuncDyn)&&(!ArcDyn)>::type * = nullptr>
void initImplImpl ()
 
template<bool FuncDyn = (IsFuncDyn), bool ArcDyn = IsArcDyn, typename std::enable_if<(!FuncDyn)&&(!ArcDyn)>::type * = nullptr>
void initImplImpl ()
 
- Protected Member Functions inherited from tuw::ParamFuncsBase< ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, TNumType, TFuncSize, TArcLatticeSize >
void initImpl ()
 Called at end of init. To be used by extended classes. More...
 

Protected Attributes

std::vector< std::size_t > funcEvalArcCacheIdxUnder_
 Contains the index of the next control point relative to the last evaluation point. More...
 
std::vector< std::vector< FuncCacheData > > funcEvalCache_
 Cached values of the used function evaluation modes. More...
 
- Protected Attributes inherited from tuw::ParamFuncsBase< ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, TNumType, TFuncSize, TArcLatticeSize >
TNumType funcsArcBegin_
 Arc parametrization at the beginning of the functions domain definitions (common for all functions). More...
 
TNumType funcsArcEnd_
 Arc parametrization at the end of the functions domain definitions (common for all functions). More...
 
TNumType funcsArcEval_
 Arc parametrization at the evaluation point (set by setEvalArc)/. More...
 
- Protected Attributes inherited from tuw::ParamFuncs
std::vector< std::size_t > func2Arc_
 Maps the parametrized functions to their afferent arc parametrizations. More...
 
std::vector< std::vector< FuncCtrlPt > > funcCtrlPt_
 Stores the control points for all the parametrized functions. More...
 
std::vector< FuncEvalModesFlagsfuncEvalReq_
 Flags for required function computation modes. More...
 
double funcsArcBegin_
 Arc parametrization at the beginning of the functions domain definitions (common for all functions). More...
 
double funcsArcEnd_
 Arc parametrization at the end of the functions domain definitions (common for all functions). More...
 
double funcsArcEval_
 Arc parametrization at the evaluation point (set by setEvalArc)/. More...
 
std::vector< ParamFuncsStructureparamFuncsStructure_
 Initialization structure "store" variable. More...
 

Private Types

using ComputeDs2DtPtr = double(ParamFuncsSpline0Dist::*)(const double &) const
 
using ComputeDs2DtPtr = TNumType(ParamFuncsSpline0Dist::*)(const TNumType &) const
 
using ComputeSFuncPtr = double(ParamFuncsSpline0Dist::*)() const
 
using ComputeSFuncPtr = TNumType(ParamFuncsSpline0Dist::*)() const
 
using FuncCacheDataType = FuncCacheData< TNumType >
 
using FuncCtrlPtType = FuncCtrlPt< TNumType >
 
using ParamFuncsBaseType = ParamFuncsBase< ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, TNumType, TFuncSize, TArcLatticeSize >
 
using ParamFuncsDistBaseType = ParamFuncsDistBase< ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, TNumType >
 
using TDM = TraveledDistCfMode
 

Private Member Functions

double computeFuncDeltaInt1 (const std::size_t &_funcIdx, const double &_arcEnd) const
 Computes the integral of the parametric function _ on interval [funcEvalArcCacheIdxOld_[func2Arc_[_funcIdx]] - 1, _arcEnd]. More...
 
TNumType computeFuncDeltaInt1 (const std::size_t &_funcIdx, const TNumType &_arcEnd) const
 Computes the integral of the parametric function _ on interval [funcEvalArcCacheIdxOld_[func2Arc_[_funcIdx]] - 1, _arcEnd]. More...
 
double computeFuncDeltaInt2 (const std::size_t &_funcIdx, const double &_arcEnd) const
 Computes the double integral integral of the parametric function _ on interval [funcEvalArcCacheIdxOld_[func2Arc_[_funcIdx]] - 1, _arcEnd]. More...
 
TNumType computeFuncDeltaInt2 (const std::size_t &_funcIdx, const TNumType &_arcEnd) const
 Computes the double integral integral of the parametric function _ on interval [funcEvalArcCacheIdxOld_[func2Arc_[_funcIdx]] - 1, _arcEnd]. More...
 
double computeS_AV () const
 Computes distance on a piecewise linear function describing the center linear acceleration. More...
 
TNumType computeS_AV () const
 Computes distance on a piecewise linear function describing the center linear acceleration. More...
 
double computeS_V () const
 Computes distance on a piecewise linear function describing the center linear velocity. More...
 
TNumType computeS_V () const
 Computes distance on a piecewise linear function describing the center linear velocity. More...
 
double computeT_AV (const double &_ds) const
 Computes arc parametrization on a piecewise linear function describing the center linear acceleration at a variation _ds. More...
 
TNumType computeT_AV (const TNumType &_ds) const
 Computes arc parametrization on a piecewise linear function describing the center linear acceleration at a variation _ds. More...
 
double computeT_V (const double &_ds) const
 Computes arc parametrization on a piecewise linear function describing the center linear velocity at a variation _ds. More...
 
TNumType computeT_V (const TNumType &_ds) const
 Computes arc parametrization on a piecewise linear function describing the center linear velocity at a variation _ds. More...
 
double computeTImpl (const double &_s, const EvalArcGuarantee &_evalArcGuarantee)
 Internal implementation of computing the arc parametrization given a distance _s. More...
 
TNumType computeTImplInternal (const TNumType &_s, const EvalArcGuarantee &_evalArcGuarantee)
 Internal implementation of computing the arc parametrization given a distance _s. More...
 
void precomputeDist ()
 Precomputes distance invervals. More...
 
void precomputeDist ()
 Precomputes distance invervals. More...
 

Private Attributes

std::vector< std::vector< std::size_t > > arc2func_
 Maps the arc parametrizations to the functions that use them. More...
 
ComputeDs2DtPtr computeDs2DtPtr_
 
ComputeSFuncPtr computeSFuncPtr_
 
TraveledDistCfMode distCfMode_
 Closed form distance computation mode. More...
 
std::vector< double > distEvalCache_
 Cached values of traveled distance computation. More...
 
std::vector< TNumType > distEvalCache_
 Cached values of traveled distance computation. More...
 
std::size_t distLinkedArcIdx_
 Index of the parametrized function that relates to distance computation. More...
 
std::vector< std::size_t > distLinkedFuncIdx_
 Indexes of parametric functions used for computing the traveled distance. More...
 
std::vector< std::size_t > distRelFuncIdx_
 

Static Private Attributes

static constexpr const bool IsArcDyn = TArcLatticeSize == -1
 
static constexpr const bool IsFuncDyn = TFuncSize == -1
 

Friends

template<typename TDerived2 , typename TNumType2 , int TFuncSize2, int TArcLatticeSize2>
class ParamFuncsBase
 

Additional Inherited Members

- Static Public Attributes inherited from tuw::ParamFuncsBase< ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, TNumType, TFuncSize, TArcLatticeSize >
static constexpr const int FuncSize
 
- Static Public Attributes inherited from tuw::ParamFuncs
static constexpr const std::size_t nrModesMax_ = asInt(FuncEvalMode::ENUM_SIZE) - 1
 Maximum number of computation modes (except the parametric function itself FUNC). Currently 4 other choices supported. More...
 
- Protected Types inherited from tuw::ParamFuncsBase< ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, TNumType, TFuncSize, TArcLatticeSize >
using FuncCtrlPtType = FuncCtrlPt< TNumType >
 
- Protected Types inherited from tuw::ParamFuncsBaseCRTP< ParamFuncsBase< ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, TNumType, TFuncSize, TArcLatticeSize > >
using eAG = EvalArcGuarantee
 
using FuncCtrlPtType = FuncCtrlPt< NumType >
 
using NumType = typename ParamFuncsBaseCRTPTraits< ParamFuncsBase< ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, TNumType, TFuncSize, TArcLatticeSize > >::NumType
 
- Protected Types inherited from tuw::ParamFuncsBaseVirt< TNumType >
using eAG = EvalArcGuarantee
 
using FuncCtrlPtType = FuncCtrlPt< TNumType >
 
- Protected Types inherited from tuw::ParamFuncsDistBaseCRTP< ParamFuncsDistBase< ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, TNumType > >
using NumType = typename ParamFuncsDistBaseCRTPTraits< ParamFuncsDistBase< ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >, TNumType > >::NumType
 

Detailed Description

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
class tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >

Todo:

Test distance computation for AV input.

Should s0 = 0 (the way it is now) or add another function that sets it?

cout the control points and their arc parametrizations (override with dist also)

Todo:

Test distance computation for AV input.

Should s0 = 0 (the way it is now) or add another function that sets it?

cout the control points and their arc parametrizations (override with dist also)

Definition at line 53 of file param_func_spline0_dist.h.

Member Typedef Documentation

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
using tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::ComputeDs2DtPtr = double (ParamFuncsSpline0Dist::*)(const double&) const
private

Definition at line 204 of file param_func_spline0_dist.h.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
using tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::ComputeDs2DtPtr = TNumType (ParamFuncsSpline0Dist::*)(const TNumType&) const
private

Definition at line 798 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
using tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::ComputeSFuncPtr = double (ParamFuncsSpline0Dist::*)() const
private

Definition at line 201 of file param_func_spline0_dist.h.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
using tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::ComputeSFuncPtr = TNumType (ParamFuncsSpline0Dist::*)() const
private

Definition at line 795 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
using tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::FuncCacheDataType = FuncCacheData<TNumType>
private

Definition at line 116 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
using tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::FuncCtrlPtType = FuncCtrlPt<TNumType>
private

Definition at line 115 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
using tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::NumType = TNumType

Definition at line 125 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
using tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::ParamFuncsBaseType = ParamFuncsBase<ParamFuncsSpline0Dist<TNumType, TFuncSize, TArcLatticeSize>, TNumType, TFuncSize, TArcLatticeSize>
private

Definition at line 112 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
using tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::ParamFuncsDistBaseType = ParamFuncsDistBase<ParamFuncsSpline0Dist<TNumType, TFuncSize, TArcLatticeSize>, TNumType>
private

Definition at line 114 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
using tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::TDM = TraveledDistCfMode
private

Definition at line 504 of file param_func_spline0_dist.hpp.

Constructor & Destructor Documentation

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::ParamFuncsSpline0Dist ( )
default
template<typename TNumType, int TFuncSize, int TArcLatticeSize>
virtual tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::~ParamFuncsSpline0Dist ( )
virtualdefault
template<typename TNumType, int TFuncSize, int TArcLatticeSize>
ParamFuncsSpline0Dist::ParamFuncsSpline0Dist ( const ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize > &  _other)

Definition at line 72 of file param_func_spline0_dist.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::ParamFuncsSpline0Dist ( ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize > &&  )
delete
template<typename TNumType, int TFuncSize, int TArcLatticeSize>
tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::ParamFuncsSpline0Dist ( )
default
template<typename TNumType, int TFuncSize, int TArcLatticeSize>
virtual tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::~ParamFuncsSpline0Dist ( )
virtualdefault
template<typename TNumType, int TFuncSize, int TArcLatticeSize>
tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::ParamFuncsSpline0Dist ( const ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize > &  _other)
inline

Definition at line 134 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::ParamFuncsSpline0Dist ( ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize > &&  )
delete

Member Function Documentation

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
double ParamFuncsSpline0Dist::computeDeltaS_V_AV ( const double &  _dt,
const double &  _v0,
const double &  _av 
)
static

Helper function that computes deltaS (from the evalArc_ position) operating on one function control point interval (used by TraveledDistCfMode::V and TraveledDistCfMode::AV modes).

Definition at line 245 of file param_func_spline0_dist.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
static TNumType tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeDeltaS_V_AV ( const TNumType &  _dt,
const TNumType &  _v0,
const TNumType &  _av 
)
inlinestatic

Helper function that computes deltaS (from the evalArc_ position) operating on one function control point interval (used by TraveledDistCfMode::V and TraveledDistCfMode::AV modes).

Definition at line 604 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
double ParamFuncsSpline0Dist::computeDeltaT_V_AV ( const double &  _ds,
const double &  _v0,
const double &  _av 
)
static

Helper function that computes deltaT (from the evalArc_ position) operating on one function control point interval (used by TraveledDistCfMode::V and TraveledDistCfMode::AV modes).

Definition at line 273 of file param_func_spline0_dist.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
static TNumType tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeDeltaT_V_AV ( const TNumType &  _ds,
const TNumType &  _v0,
const TNumType &  _av 
)
inlinestatic

Helper function that computes deltaT (from the evalArc_ position) operating on one function control point interval (used by TraveledDistCfMode::V and TraveledDistCfMode::AV modes).

Definition at line 635 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
double tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeFuncDeltaInt1 ( const std::size_t &  _funcIdx,
const double &  _arcEnd 
) const
private

Computes the integral of the parametric function _ on interval [funcEvalArcCacheIdxOld_[func2Arc_[_funcIdx]] - 1, _arcEnd].

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
TNumType tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeFuncDeltaInt1 ( const std::size_t &  _funcIdx,
const TNumType &  _arcEnd 
) const
inlineprivate

Computes the integral of the parametric function _ on interval [funcEvalArcCacheIdxOld_[func2Arc_[_funcIdx]] - 1, _arcEnd].

Definition at line 475 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
double tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeFuncDeltaInt2 ( const std::size_t &  _funcIdx,
const double &  _arcEnd 
) const
private

Computes the double integral integral of the parametric function _ on interval [funcEvalArcCacheIdxOld_[func2Arc_[_funcIdx]] - 1, _arcEnd].

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
TNumType tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeFuncDeltaInt2 ( const std::size_t &  _funcIdx,
const TNumType &  _arcEnd 
) const
inlineprivate

Computes the double integral integral of the parametric function _ on interval [funcEvalArcCacheIdxOld_[func2Arc_[_funcIdx]] - 1, _arcEnd].

Definition at line 485 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
double ParamFuncsSpline0Dist::computeFuncDiff1 ( const std::size_t &  _funcIdx) const
overridevirtual

Computes 1st derivative of parametric function with index _funcIdx at parametric arc set by setEvalArc.

Implements tuw::ParamFuncs.

Definition at line 227 of file param_func_spline0.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
TNumType tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeFuncDiff1Impl ( const std::size_t &  _funcIdx) const
inline

Definition at line 443 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
double ParamFuncsSpline0Dist::computeFuncDiff2 ( const std::size_t &  _funcIdx) const
overridevirtual

Computes 2nd derivative of parametric function with index _funcIdx at parametric arc set by setEvalArc.

Implements tuw::ParamFuncs.

Definition at line 232 of file param_func_spline0.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
TNumType tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeFuncDiff2Impl ( const std::size_t &  _funcIdx) const
inline

Definition at line 451 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
double ParamFuncsSpline0Dist::computeFuncInt1 ( const std::size_t &  _funcIdx) const
overridevirtual

Computes integral of parametric function with index _funcIdx on interval [funcsArcBegin_, funcsArcEnd_].

Implements tuw::ParamFuncs.

Definition at line 237 of file param_func_spline0.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
TNumType tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeFuncInt1Impl ( const std::size_t &  _funcIdx) const
inline

Definition at line 457 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
double ParamFuncsSpline0Dist::computeFuncInt2 ( const std::size_t &  _funcIdx) const
overridevirtual

Computes double integral of parametric function with index _funcIdx on interval [funcsArcBegin_, funcsArcEnd_].

Implements tuw::ParamFuncs.

Definition at line 242 of file param_func_spline0.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
TNumType tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeFuncInt2Impl ( const std::size_t &  _funcIdx) const
inline

Definition at line 465 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
double ParamFuncsSpline0Dist::computeFuncVal ( const std::size_t &  _funcIdx) const
overridevirtual

Computes value of parametric function with index _funcIdx at parametric arc set by setEvalArc.

Implements tuw::ParamFuncs.

Definition at line 221 of file param_func_spline0.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
TNumType tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeFuncValImpl ( const std::size_t &  _funcIdx) const
inline

Definition at line 435 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
double ParamFuncsSpline0Dist::computeS ( ) const
overridevirtual

Solves the equation $ \int_{0}^{evalArc\_}{ |v(\mathbf{p}, t)| } dt = \_s $ for _deltaS (evalArc_: time, _s: traveled distance, v: body linear velocity, $ \mathbf{p} $: parametrized control points).

Implements tuw::ParamFuncsDist.

Definition at line 103 of file param_func_spline0_dist.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
void tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeS2TLattice ( const std::vector< double > &  _sLattice,
std::vector< double > &  _tLattice 
)
overridevirtual

Computes arc parametrization lattice given a distance-parametrized lattice.

Parameters
_sLatticeDistance-parametrized input lattice. It is assumed that the vector is monotonically increasing.
_tLatticeArc-parametrized output lattice.

Implements tuw::ParamFuncsDist.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
void tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeS2TLattice ( const double &  _arc0,
const double &  _ds,
std::vector< double > &  _tLattice 
)
overridevirtual

Computes arc parametrization lattice given an inital arc and distance parametrized sampling interval.

The function computes the temporal lattice starting with s(_arc0) and ending with the maximum value of the arc parametrization.

Parameters
_sLatticeDistance-parametrized input lattice. It is assumed that the vector values are monotonically increasing.
_tLatticeArc-parametrized output lattice.

Implements tuw::ParamFuncsDist.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
void tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeS2TLatticeImpl ( const std::vector< TNumType > &  _sLattice,
std::vector< TNumType > &  _tLattice 
)
inline

Definition at line 562 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
void tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeS2TLatticeImpl ( const TNumType &  _arc0,
const TNumType &  _ds,
std::vector< TNumType > &  _tLattice 
)
inline

Definition at line 583 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
double ParamFuncsSpline0Dist::computeS_AV ( ) const
private

Computes distance on a piecewise linear function describing the center linear acceleration.

Definition at line 116 of file param_func_spline0_dist.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
TNumType tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeS_AV ( ) const
inlineprivate

Computes distance on a piecewise linear function describing the center linear acceleration.

Definition at line 752 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
double ParamFuncsSpline0Dist::computeS_V ( ) const
private

Computes distance on a piecewise linear function describing the center linear velocity.

Definition at line 107 of file param_func_spline0_dist.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
TNumType tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeS_V ( ) const
inlineprivate

Computes distance on a piecewise linear function describing the center linear velocity.

Definition at line 741 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
TNumType tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeSImpl ( ) const
inline

Definition at line 534 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
double ParamFuncsSpline0Dist::computeT ( const double &  _s,
const EvalArcGuarantee _evalArcGuarantee = EvalArcGuarantee::NONE 
)
overridevirtual

Solves the equation $ \int_{0}^{\_deltaT}{ |v(\mathbf{p}, t)| } dt = \_s $ for _s (evalArc_: time, _s: traveled distance, v: body linear velocity, $ \mathbf{p} $: parametrized control points).

Implements tuw::ParamFuncsDist.

Definition at line 176 of file param_func_spline0_dist.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
double ParamFuncsSpline0Dist::computeT_AV ( const double &  _ds) const
private

Computes arc parametrization on a piecewise linear function describing the center linear acceleration at a variation _ds.

Definition at line 239 of file param_func_spline0_dist.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
TNumType tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeT_AV ( const TNumType &  _ds) const
inlineprivate

Computes arc parametrization on a piecewise linear function describing the center linear acceleration at a variation _ds.

Definition at line 772 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
double ParamFuncsSpline0Dist::computeT_V ( const double &  _ds) const
private

Computes arc parametrization on a piecewise linear function describing the center linear velocity at a variation _ds.

Definition at line 234 of file param_func_spline0_dist.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
TNumType tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeT_V ( const TNumType &  _ds) const
inlineprivate

Computes arc parametrization on a piecewise linear function describing the center linear velocity at a variation _ds.

Definition at line 764 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
double ParamFuncsSpline0Dist::computeTImpl ( const double &  _s,
const EvalArcGuarantee _evalArcGuarantee 
)
private

Internal implementation of computing the arc parametrization given a distance _s.

Definition at line 191 of file param_func_spline0_dist.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
TNumType tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeTImpl ( const TNumType &  _s,
const EvalArcGuarantee _evalArcGuarantee 
)
inline

Definition at line 540 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
TNumType tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeTImplInternal ( const TNumType &  _s,
const EvalArcGuarantee _evalArcGuarantee 
)
inlineprivate

Internal implementation of computing the arc parametrization given a distance _s.

Definition at line 688 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
void ParamFuncsSpline0Dist::initImpl ( )
overrideprotectedvirtual

Called at end of init. To be used by extended classes.

Implements tuw::ParamFuncs.

Definition at line 45 of file param_func_spline0.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
template<bool FuncDyn = (IsFuncDyn), bool ArcDyn = IsArcDyn, typename std::enable_if<(FuncDyn)&&(ArcDyn)>::type * = nullptr>
void tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::initImplImpl ( )
inlineprotected

Definition at line 164 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
template<bool FuncDyn = (IsFuncDyn), bool ArcDyn = IsArcDyn, typename std::enable_if<(!FuncDyn)&&(ArcDyn)>::type * = nullptr>
void tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::initImplImpl ( )
inlineprotected

Definition at line 195 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
template<bool FuncDyn = (IsFuncDyn), bool ArcDyn = IsArcDyn, typename std::enable_if<(FuncDyn)&&(!ArcDyn)>::type * = nullptr>
void tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::initImplImpl ( )
inlineprotected

Definition at line 224 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
template<bool FuncDyn = (IsFuncDyn), bool ArcDyn = IsArcDyn, typename std::enable_if<(!FuncDyn)&&(!ArcDyn)>::type * = nullptr>
void tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::initImplImpl ( )
inlineprotected

Definition at line 252 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
ParamFuncsSpline0Dist & ParamFuncsSpline0Dist::operator= ( const ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize > &  _other)

Definition at line 77 of file param_func_spline0_dist.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
ParamFuncsSpline0Dist& tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::operator= ( ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize > &&  )
delete
template<typename TNumType, int TFuncSize, int TArcLatticeSize>
ParamFuncsSpline0Dist& tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::operator= ( const ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize > &  _other)
inline

Definition at line 142 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
ParamFuncsSpline0Dist& tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::operator= ( ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize > &&  )
delete
template<typename TNumType, int TFuncSize, int TArcLatticeSize>
void ParamFuncsSpline0Dist::precompute ( )
overridevirtual

Precomputes cached data. To be called after ANY control point modifications.

Implements tuw::ParamFuncs.

Definition at line 73 of file param_func_spline0.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
void ParamFuncsSpline0Dist::precomputeDist ( )
private

Precomputes distance invervals.

Definition at line 84 of file param_func_spline0_dist.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
void tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::precomputeDist ( )
inlineprivate

Precomputes distance invervals.

Definition at line 668 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
void tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::precomputeImpl ( )
inline

Precomputes cached data. To be called after ANY control point modifications.

Definition at line 276 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
void ParamFuncsSpline0Dist::setDistCfMode ( TraveledDistCfMode  _distCfMode,
const std::vector< std::size_t > &  _distRelFuncIdx 
)
override

Definition at line 47 of file param_func_spline0_dist.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
void tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::setDistCfModeImpl ( TraveledDistCfMode  _distCfMode,
const std::vector< std::size_t > &  _distRelFuncIdx 
)
inline

Definition at line 508 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
void ParamFuncsSpline0Dist::setEvalArc ( const double &  _funcsArcEval,
const EvalArcGuarantee _evalArcGuarantee = EvalArcGuarantee::NONE 
)
overridevirtual

Sets parametric function evaluation arc.

Implements tuw::ParamFuncs.

Definition at line 151 of file param_func_spline0.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
void tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::setEvalArcImpl ( const TNumType &  _arcEval,
const EvalArcGuarantee _eAG 
)
inline

Definition at line 356 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
void ParamFuncsSpline0Dist::setEvalDist ( const double &  _funcsDistEval,
const EvalArcGuarantee _evalArcGuarantee = EvalArcGuarantee::NONE 
)
overridevirtual

Moves to evaluation arc at which the traveled distance _funcsDistEval is achieved.

Implements tuw::ParamFuncsDist.

Definition at line 171 of file param_func_spline0_dist.cpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
void tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::setEvalDistImpl ( const TNumType &  _funcsDistEval,
const EvalArcGuarantee _evalArcGuarantee 
)
inline

Definition at line 556 of file param_func_spline0_dist.hpp.

Friends And Related Function Documentation

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
template<typename TDerived2 , typename TNumType2 , int TFuncSize2, int TArcLatticeSize2>
friend class ParamFuncsBase
friend

Definition at line 807 of file param_func_spline0_dist.hpp.

Member Data Documentation

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
std::vector<std::vector<std::size_t> > tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::arc2func_
private

Maps the arc parametrizations to the functions that use them.

Definition at line 130 of file param_func_spline0_dist.h.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
ComputeDs2DtPtr tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeDs2DtPtr_
private

Definition at line 210 of file param_func_spline0_dist.h.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
ComputeSFuncPtr tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::computeSFuncPtr_
private

Definition at line 207 of file param_func_spline0_dist.h.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
TraveledDistCfMode tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::distCfMode_
private

Closed form distance computation mode.

Definition at line 192 of file param_func_spline0_dist.h.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
std::vector<double> tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::distEvalCache_
private

Cached values of traveled distance computation.

Definition at line 189 of file param_func_spline0_dist.h.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
std::vector<TNumType> tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::distEvalCache_
private

Cached values of traveled distance computation.

Definition at line 783 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
std::size_t tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::distLinkedArcIdx_
private

Index of the parametrized function that relates to distance computation.

Definition at line 198 of file param_func_spline0_dist.h.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
std::vector< std::size_t > tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::distLinkedFuncIdx_
private

Indexes of parametric functions used for computing the traveled distance.

Definition at line 186 of file param_func_spline0_dist.h.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
std::vector< std::size_t > tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::distRelFuncIdx_
private
Todo:
Todo:

Definition at line 195 of file param_func_spline0_dist.h.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
std::vector<std::size_t> tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::funcEvalArcCacheIdxUnder_
protected

Contains the index of the next control point relative to the last evaluation point.

Definition at line 124 of file param_func_spline0_dist.h.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
std::vector<std::vector<FuncCacheData> > tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::funcEvalCache_
protected

Cached values of the used function evaluation modes.

Definition at line 127 of file param_func_spline0_dist.h.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
constexpr const bool tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::IsArcDyn = TArcLatticeSize == -1
staticprivate

Definition at line 122 of file param_func_spline0_dist.hpp.

template<typename TNumType, int TFuncSize, int TArcLatticeSize>
constexpr const bool tuw::ParamFuncsSpline0Dist< TNumType, TFuncSize, TArcLatticeSize >::IsFuncDyn = TFuncSize == -1
staticprivate

Definition at line 119 of file param_func_spline0_dist.hpp.


The documentation for this class was generated from the following files:


tuw_control
Author(s): George Todoran
autogenerated on Mon Jun 10 2019 15:27:23