39 #ifndef OMPL_MULTILEVEL_PLANNERS_BUNDLESPACE_DATASTRUCTURES_PARAMETER_
40 #define OMPL_MULTILEVEL_PLANNERS_BUNDLESPACE_DATASTRUCTURES_PARAMETER_
42 #include <ompl/util/Exception.h>
54 Parameter() =
default;
56 Parameter(
double valueInit) : valueInit_(valueInit){};
58 Parameter(
double valueInit,
double valueTarget) : valueInit_(valueInit), valueTarget_(valueTarget){};
63 valueInit_ = valueInit;
68 valueTarget_ = valueTarget;
73 counterInit_ = counterInit;
78 counterTarget_ = counterTarget;
99 return counterTarget_;
105 if (counter_ > counterTarget_)
109 double t = (counter_ - counterInit_) / (
double)(counterTarget_ - counterInit_);
111 double d = valueInit_ + t * (valueTarget_ - valueInit_);
119 counter_ = counterInit_;
135 double valueInit_{0.0};
137 double valueTarget_{1.0};
139 unsigned long long counter_{0};
140 unsigned long long counterInit_{0};
141 unsigned long long counterTarget_{100};
unsigned long long getCounter()
Get current counter.
double operator()(void)
Call parameter and increase counter.
void setValueInit(double valueInit)
Set initial value (default: 0.0)
void reset()
Reset counter to init counter.
unsigned long long getCounterTarget()
Get counter target value.
void incrementCounter()
Increment counter.
void setCounterTarget(unsigned long long counterTarget)
Set counter target value (default: 100)
void setCounterInit(unsigned long long counterInit)
Set counter init value (default: 0)
double getValueTarget()
Get target value.
unsigned long long getCounterInit()
Get counter init value.
void setValueTarget(double valueTarget)
Set target value (default: 1.0)
Main namespace. Contains everything in this library.
double getValueInit()
Get init value.