StraightLine< T, U > Class Template Reference

Linear least squares fit to a straight line. More...

#include <StraightLine.h>

Public Member Functions

 StraightLine ()
 Default constructor.
 
void add_coordinate (double x, const Estimate< T, U > &d)
 Addition operator.
 
Estimate< T, U > get_intercept () const
 Return the intercept, a.
 
Estimate< T, U > get_slope () const
 Return the slope, b.
 

Protected Attributes

S
 
S_x
 
S_y
 
S_xx
 
S_xy
 

Detailed Description

template<typename T, typename U = T>
class StraightLine< T, U >

Linear least squares fit to a straight line.

Implements the solution from section 15.2 of Numerical Recipes


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

Generated using doxygen 1.8.17