IMP logo
IMP Reference Guide  develop.b708a66810,2021/08/02
The Integrative Modeling Platform
IMP::algebra::LinearFit2D Class Reference

Calculate line that fits best the input data points (Linear least squares) More...

#include <IMP/algebra/LinearFit.h>

+ Inheritance diagram for IMP::algebra::LinearFit2D:

Detailed Description

Calculate line that fits best the input data points (Linear least squares)

Definition at line 19 of file LinearFit.h.

Public Member Functions

 LinearFit2D (const Vector2Ds &data, const Floats &error_bars=Floats())
 Constructor. More...
 
double get_a () const
 get a value (a*x) More...
 
double get_b () const
 get b value (constant) More...
 
double get_fit_error () const
 fit error More...
 
void show (std::ostream &out=std::cout) const
 show equation More...
 

Constructor & Destructor Documentation

IMP::algebra::LinearFit2D::LinearFit2D ( const Vector2Ds data,
const Floats error_bars = Floats() 
)

Constructor.

Parameters
[in]datavector of pairs (VectorD<2>) with x and their corresponding y values (linear least squares)
[in]error_barsvector of pairs (VectorD<3>) with x, corresponding y values and y errors (weighted linear least squares)

Member Function Documentation

double IMP::algebra::LinearFit2D::get_a ( ) const

get a value (a*x)

Definition at line 34 of file LinearFit.h.

double IMP::algebra::LinearFit2D::get_b ( ) const

get b value (constant)

Definition at line 37 of file LinearFit.h.

double IMP::algebra::LinearFit2D::get_fit_error ( ) const

fit error

Definition at line 31 of file LinearFit.h.

void IMP::algebra::LinearFit2D::show ( std::ostream &  out = std::cout) const

show equation


The documentation for this class was generated from the following file: