IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
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 20 of file LinearFit.h.

Public Member Functions

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

Constructor & Destructor Documentation

◆ LinearFit2D() [1/2]

IMP::algebra::LinearFit2D::LinearFit2D ( )

Definition at line 22 of file LinearFit.h.

◆ LinearFit2D() [2/2]

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

◆ get_a()

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

get a value (a*x)

Definition at line 37 of file LinearFit.h.

◆ get_b()

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

get b value (constant)

Definition at line 40 of file LinearFit.h.

◆ get_fit_error()

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

fit error

Definition at line 34 of file LinearFit.h.

◆ show()

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

show equation


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