9 #ifndef IMPALGEBRA_PARABOLIC_FIT_H
10 #define IMPALGEBRA_PARABOLIC_FIT_H
16 IMPALGEBRA_BEGIN_NAMESPACE
33 double get_a()
const {
return a_; }
36 double get_b()
const {
return b_; }
39 double get_c()
const {
return c_; }
42 out <<
"y = " << a_ <<
"x^2 + " << b_ <<
"x + " << c_ << std::endl;
43 out <<
"Error = " << error_ << std::endl;
47 void find_regression(
const Vector2Ds& data);
48 void evaluate_error(
const Vector2Ds& data);
60 IMPALGEBRA_END_NAMESPACE
double get_b() const
get b value (b*x)
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
base::Vector< VectorD< 2 > > Vector2Ds
#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.
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)