1 #ifndef BALL_MATHS_CUBICSPLINE1D_H 2 #define BALL_MATHS_CUBICSPLINE1D_H 11 #ifndef BALL_DATATYPE_OPTIONS_H 49 const std::vector<float>& sample_values,
50 bool return_average =
false,
51 bool is_natural =
true,
52 float lower_derivative = 0.0,
53 float upper_derivative = 0.0,
54 int verbosity = VERBOSITY_LEVEL_DEBUG);
69 const std::vector<float>& sample_values,
71 bool is_natural =
true,
72 float lower_derivative = 0.0,
73 float upper_derivative = 0.0,
74 int verbosity = VERBOSITY_LEVEL_DEBUG);
89 const std::vector<float>& sample_values,
93 bool is_natural =
true,
94 float lower_derivative = 0.0,
95 float upper_derivative = 0.0,
96 int verbosity = VERBOSITY_LEVEL_DEBUG);
111 const std::vector<float>& sample_values,
114 bool return_average =
false,
116 bool is_natural =
true,
117 float lower_derivative = 0.0,
118 float upper_derivative = 0.0,
119 int verbosity = VERBOSITY_LEVEL_DEBUG);
143 float operator () (
float x);
155 void setCurvature(std::vector<float> curvature);
161 void setValues(std::vector<float> values,
bool recompute =
true);
165 std::vector<float>
getValues()
const {
return sample_values_;}
175 void setPositions(std::vector<float> positions,
bool recompute =
true);
200 void makeNatural(
bool recompute =
true);
206 void setBoudaryDerivatives(
float lower_derivative,
float upper_derivative,
bool recompute =
true);
213 void setLowerDerivative(
float derivative,
bool recompute =
true);
223 void setUpperDerivative(
float derivative,
bool recompute =
true);
238 std::vector<float> sample_positions_;
240 std::vector<float> sample_values_;
242 std::vector<float> curvature_;
245 bool return_average_;
251 float default_value_;
263 float lower_derivative_;
266 float upper_derivative_;
std::vector< float > getValues() const
static const int VERBOSITY_LEVEL_DEBUG
std::vector< float > getCurvature() const
void setLowerBound(float lb)
float getDefaultValue() const
void setDefaultValue(float value)
static const int VERBOSITY_LEVEL_CRITICAL
float getUpperBound() const
void setUpperBound(float ub)
T min(const T &a, const T &b)
void setVerbosity(int verbosity)
std::vector< float > getPositions() const
float getLowerBound() const
float getLowerDerivative() const
float getUpperDerivative() const
#define BALL_CREATE(name)