Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

LeastSqFit



Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Synopsis

#include <rw/lsqfit.h>
#include <rw/math/mathvec.h>
RWMathVec<double> x, y;
LeastSqFit lsf(x, y);

Description

The class LeastSqFit constructs a linear least squares fit to a straight line from input data, with or without weighting factors. This class is of precision double. Once a LeastSqFit is constructed, various methods are provided to interrogate it.

Public Constructors

LeastSqFit(const RWMathVec<double>& x, 
           const RWMathVec<double>& y);
LeastSqFit(const RWMathVec<double>& x, 
           const RWMathVec<double>& y,
           const RWMathVec<double>& sigmay);

Public Member Functions

double   
correlationCoeff() const;
double   
intercept() const;
double
interceptStandardDev() const;
double
slope() const;
double
slopeStandardDev() const;
double
xPosition(double y) const;
double
yPosition(double x) const;

Related Global Operator

ostream&    operator<<(ostream& s, const LeastSqFit& f);


Previous fileTop of DocumentContentsIndexNext file

©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.