1#ifndef BALL_MATHS_CUBICSPLINE2D_H
2#define BALL_MATHS_CUBICSPLINE2D_H
7#ifndef BALL_MATHS_CUBICSPLINE1D_H
11#ifndef BALL_COMMON_EXCEPTION_H
53 const
std::vector<
float>& sample_positions_y,
54 const
std::vector<
std::vector<
float> >& sample_values,
55 bool return_average = false,
56 bool is_natural = true,
57 const
std::vector<
float>& x_lower_derivatives =
std::vector<
float>(),
58 const
std::vector<
float>& x_upper_derivatives =
std::vector<
float>(),
59 float y_lower_derivative = 0.,
60 float y_upper_derivative = 0.,
61 int verbosity = VERBOSITY_LEVEL_DEBUG);
82 const
std::vector<
float>& sample_positions_y,
83 const
std::vector<
std::vector<
float> >& sample_values,
84 const
std::vector<
float>& x_default_values,
85 float y_default_value,
86 const
std::vector<
float>& x_lower_bounds,
87 const
std::vector<
float>& x_upper_bounds,
90 bool is_natural = true,
91 const
std::vector<
float>& x_lower_derivatives =
std::vector<
float>(),
92 const
std::vector<
float>& x_upper_derivatives =
std::vector<
float>(),
93 float y_lower_derivative = 0.0,
94 float y_upper_derivative = 0.0,
95 int verbosity = VERBOSITY_LEVEL_DEBUG);
118 const
std::vector<
float>& sample_positions_y,
119 const
std::vector<
std::vector<
float> >& sample_values,
120 bool return_average = false,
121 bool is_natural = true,
122 const
std::vector<
float>& x_lower_derivatives =
std::vector<
float>(),
123 const
std::vector<
float>& x_upper_derivatives =
std::vector<
float>(),
124 float y_lower_derivative = 0.,
125 float y_upper_derivative = 0.,
126 int verbosity = VERBOSITY_LEVEL_DEBUG);
145 const
std::vector<
float>& sample_positions_y,
146 const
std::vector<
std::vector<
float> >& sample_values,
147 const
std::vector<
float>& x_default_values,
148 float y_default_value,
149 const
std::vector<
float>& x_lower_bounds,
150 const
std::vector<
float>& x_upper_bounds,
153 bool is_natural = true,
154 const
std::vector<
float>& x_lower_derivatives =
std::vector<
float>(),
155 const
std::vector<
float>& x_upper_derivatives =
std::vector<
float>(),
156 float y_lower_derivative = 0.0,
157 float y_upper_derivative = 0.0,
158 int verbosity = VERBOSITY_LEVEL_DEBUG);
170 void setVerbosity(
int verbosity);
182 float operator () (
float x,
float y);
187 float getXDefaultValue(
Index x) const;
191 float getYDefaultValue()
const {
return y_default_value_;}
301 void createBiCubicSpline();
305 std::vector< std::vector<float> > sample_positions_x_;
308 std::vector<float> sample_positions_y_;
311 std::vector<CubicSpline1D> splines_;
314 std::vector<std::vector<float> > sample_values_;
321 bool return_average_;
328 std::vector<float> x_default_values_;
335 float y_default_value_;
340 float default_value_;
343 vector<float> x_lower_bounds_;
346 vector<float> x_upper_bounds_;
349 float y_lower_bound_;
352 float y_upper_bound_;
356 vector<bool> x_is_natural_;
363 vector<float> x_lower_derivatives_;
366 vector<float> x_upper_derivatives_;
369 float y_lower_derivative_;
372 float y_upper_derivative_;
#define BALL_CREATE(name)
static const int VERBOSITY_LEVEL_CRITICAL
void setYDefaultValue(float y_default_value)
void makeAllXNatural(bool recompute=true)
float getYUpperDerivative()
float getXUpperBounds(Index x) const
float getXLowerBounds(Index x) const
void setYUpperBound(float ub)
Size getNumberOfSplines() const
void setYLowerBound(float lb)
float getYLowerDerivative()
void setXLowerDerivatives(vector< float > ld, bool recompute=true)
vector< bool > isXNatural() const
void setYUpperDerivative(float ud, bool recompute=true)
CubicSpline1D & getSpline(Position i)
float getXUpperDerivatives(Index x)
void setYLowerDerivative(float ld, bool recompute=true)
void makeXNatural(Index x, bool recompute=true)
void setXLowerBounds(vector< float > lb)
const vector< float > & getXLowerBounds() const
const CubicSpline1D & getSpline(Position i) const
void setXDefaultValues(vector< float > x_default_values)
vector< float > & getXLowerDerivatives()
vector< float > & getXUpperDerivatives()
static const int VERBOSITY_LEVEL_DEBUG
float getXLowerDerivatives(Index x)
void setXUpperBounds(vector< float > ub)
void makeYNatural(bool y_is_natural, bool recompute=true)
const vector< float > & getXUpperBounds() const
void setXUpperDerivatives(vector< float > ud, bool recompute=true)