org.jutil.math.matrix
Interface LeastSquaresSolver

All Known Implementing Classes:
QRLeastSquaresSolver

public interface LeastSquaresSolver

A class of objects that solve least square problems represented as a matrix.

Version:
$Revision: 1.3 $
Author:
Marko van Dooren

Field Summary
static java.lang.String CVS_REVISION
           
 
Method Summary
 Column solve(Matrix A, Column b)
          public behavior

pre A != null;
pre b != null;
pre b.size() == A.getNbRows();

post (* (\forall Column col; col.size() == b.size();
b.minus(A.times(\result)).norm(2) <=
b.minus(A.times(col)).norm(2)) *);
 

Field Detail

CVS_REVISION

public static final java.lang.String CVS_REVISION
Method Detail

solve

public Column solve(Matrix A,
                    Column b)
public behavior

pre A != null;
pre b != null;
pre b.size() == A.getNbRows();

post (* (\forall Column col; col.size() == b.size();
b.minus(A.times(\result)).norm(2) <=
b.minus(A.times(col)).norm(2)) *);

Solve the system of linear equations as defined by min(||b - A * x ||). The norm used is the 2-norm.

Parameters:
A - The matrix containing the coefficients of the equation. Each row represents an equation. The i-th element of a row represents the coefficient of the i-th variable in the equation represented by that row.
b - The column representing the right-hand sides of the equation. The right-handig side of the i-th row is the i-th element of the Column