9 #ifndef IMPALGEBRA_LINEAR_FIT_H
10 #define IMPALGEBRA_LINEAR_FIT_H
16 IMPALGEBRA_BEGIN_NAMESPACE
34 double get_a()
const {
return a_; }
37 double get_b()
const {
return b_; }
41 out <<
"y = " << a_ <<
"x + " << b_ << std::endl;
42 out <<
"Error = " << error_ << std::endl;
59 IMPALGEBRA_END_NAMESPACE
Base class for geometric types.
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
IMP::Vector< Float > Floats
Standard way to pass a bunch of Float values.
double get_b() const
get b value (constant)
Vector< VectorD< 2 > > Vector2Ds
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
Base class for geometric types.
double get_a() const
get a value (a*x)
Calculate line that fits best the input data points (Linear least squares)
double get_fit_error() const
fit error