LeastSquare Class Reference

To compute a least square approximation. More...

`#include <LeastSquare.h>`

## Public Member Functions

LeastSquare ()
Default constructor.

LeastSquare (vector< Fct * > &f, const Vect< real_t > &x, const Vect< real_t > &y, Vect< real_t > &a)
Constructor of least square approximation using given basis functions.

LeastSquare (DMatrix< real_t > &B, const Vect< real_t > &y, Vect< real_t > &a)
Constructor with given least square matrix.

LeastSquare (const Vect< real_t > &x, const Vect< real_t > &y, size_t N, Vect< real_t > &a)
Constructor for polynomial regression.

LeastSquare (const Vect< real_t > &x, const Vect< real_t > &y, real_t &a0, real_t &a1)
Constructor for linear regression.

~LeastSquare ()
Destructor.

void set (vector< Fct * > &f, const Vect< real_t > &x, const Vect< real_t > &y, Vect< real_t > &a)
Set least square approximation using given basis functions.

void set (DMatrix< real_t > &B, const Vect< real_t > &y, Vect< real_t > &a)
Set least square approximation using least square matrix.

void set (const Vect< real_t > &x, const Vect< real_t > &y, size_t N, Vect< real_t > &a)
Set least square approximation by polynomial regression.

void set (const Vect< real_t > &x, const Vect< real_t > &y, real_t &a0, real_t &a1)
Set least square approximation by linear regression.

int run ()
Compute least square approximation.

## Detailed Description

To compute a least square approximation.

This class enables using approximation methods to mathematically define a geometry.

The algorithms used in this class are largely inspired from the book: An Introduction to NURBS, by David F. Rogers. Copyright (C) 2000 David F. Rogers,