9 #ifndef IMPALGEBRA_PARABOLIC_FIT_H
10 #define IMPALGEBRA_PARABOLIC_FIT_H
16 IMPALGEBRA_BEGIN_NAMESPACE
32 double get_a()
const {
return a_; }
35 double get_b()
const {
return b_; }
38 double get_c()
const {
return c_; }
41 out <<
"y = " << a_ <<
"x^2 + " << b_ <<
"x + " << c_ << std::endl;
42 out <<
"Error = " << error_ << std::endl;
46 void find_regression(
const Vector2Ds& data);
47 void evaluate_error(
const Vector2Ds& data);
59 IMPALGEBRA_END_NAMESPACE
Base class for geometric types.
double get_b() const
get b value (b*x)
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
Calculate parabola that fits best the input data points.
Vector< VectorD< 2 > > Vector2Ds
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
Base class for geometric types.
double get_c() const
get c value (constant)
double get_fit_error() const
fit error
double get_a() const
get a value (a*x^2)