Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Math Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

LeastSqFit

Module:  Essential Math    Group:  Statistics classes


Does not inherit

Local Index

Members

Non-Members

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 DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.