1 #ifndef BALL_MATHS_CUBICSPLINE1D_H
2 #define BALL_MATHS_CUBICSPLINE1D_H
11 #ifndef BALL_DATATYPE_OPTIONS_H
48 CubicSpline1D(const std::vector<
float>& sample_positions,
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);
68 CubicSpline1D(const std::vector<
float>& sample_positions,
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);
88 CubicSpline1D(const std::vector<
float>& sample_positions,
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);
110 CubicSpline1D(const std::vector<
float>& sample_positions,
111 const std::vector<
float>& sample_values,
114 bool return_average = false,
115 float default_value = std::numeric_limits<
float>::
min(),
116 bool is_natural = true,
117 float lower_derivative = 0.0,
118 float upper_derivative = 0.0,
119 int verbosity = VERBOSITY_LEVEL_DEBUG);
124 CubicSpline1D(const CubicSpline1D& cs1D);
128 virtual ~CubicSpline1D();
131 void setVerbosity(
int verbosity) { verbosity_ = verbosity; }
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);