linear_fit Class Reference

Public Member Functions

 linear_fit ()
 
void add (const float x, const float y)
 
float slope () const
 
float offset () const
 
size_t sample_count () const
 

Detailed Description

Compute the linear fit online

Constructor & Destructor Documentation

linear_fit ( )
inline

Constructor

Member Function Documentation

void add ( const float  x,
const float  y 
)
inline

Add a point to the linear fit model

Parameters
xx-coordinate
yy-coordinate
float offset ( ) const
inline

Offset of the line

Returns
offset of the line
size_t sample_count ( ) const
inline

Get the current sample count

Returns
current sample count
float slope ( ) const
inline

Slope of the line

Returns
slope of the line

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