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};
void reset()
Reset counter to init counter.
double operator()(void)
Call parameter and increase counter.
void incrementCounter()
Increment counter.
double getValueInit()
Get init value.
void setCounterInit(unsigned long long counterInit)
Set counter init value (default: 0)
void setValueTarget(double valueTarget)
Set target value (default: 1.0)
unsigned long long getCounterTarget()
Get counter target value.
void setValueInit(double valueInit)
Set initial value (default: 0.0)
void setCounterTarget(unsigned long long counterTarget)
Set counter target value (default: 100)
unsigned long long getCounterInit()
Get counter init value.
double getValueTarget()
Get target value.
unsigned long long getCounter()
Get current counter.
Main namespace. Contains everything in this library.