9 #ifndef IMPALGEBRA_LINEAR_FIT_H 
   10 #define IMPALGEBRA_LINEAR_FIT_H 
   14 #include <cereal/access.hpp> 
   17 IMPALGEBRA_BEGIN_NAMESPACE
 
   37   double get_a()
 const { 
return a_; }
 
   40   double get_b()
 const { 
return b_; }
 
   44     out << 
"y = " << a_ << 
"x + " << b_ << std::endl;
 
   45     out << 
"Error = " << error_ << std::endl;
 
   54   friend class cereal::access;
 
   56   template<
class Archive> 
void serialize(Archive &ar) {
 
   68 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