org.jutil.math.matrix
Class QRLeastSquaresSolver

java.lang.Object
  |
  +--org.jutil.math.matrix.AbstractSolver
        |
        +--org.jutil.math.matrix.QRLeastSquaresSolver
All Implemented Interfaces:
LeastSquaresSolver

public class QRLeastSquaresSolver
extends AbstractSolver
implements LeastSquaresSolver

A class of objects that solve least squares problems using its QR decomposition.


Field Summary
static java.lang.String CVS_REVISION
           
 
Constructor Summary
QRLeastSquaresSolver(QRDecomposer decomposer)
          Initialize a new QRLeastSquaresSolver with the given QRDecomposer.
 
Method Summary
 QRDecomposer getDecomposer()
          Return the QRDecomposer of this QRLeastSquaresSolver.
 Column solve(Matrix A, Column b)
          see superclass
 
Methods inherited from class org.jutil.math.matrix.AbstractSolver
backSubstitute, forwardSubstitute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CVS_REVISION

public static final java.lang.String CVS_REVISION
Constructor Detail

QRLeastSquaresSolver

public QRLeastSquaresSolver(QRDecomposer decomposer)
Initialize a new QRLeastSquaresSolver with the given QRDecomposer.

Parameters:
decomposer - The QRDecomposer to be used by this QRLeastSquaresSolver.

Specifications:
public behavior
requires decomposer != null;
ensures getDecomposer() == decomposer;
Method Detail

getDecomposer

public QRDecomposer getDecomposer()
Return the QRDecomposer of this QRLeastSquaresSolver.

solve

public Column solve(Matrix A,
                    Column b)
see superclass
Specifications inherited from overridden method in interface LeastSquaresSolver:
public behavior
requires A != null;
requires b != null;
requires b.size() == A.getNbRows();
ensures (* (\forall Column col; col.size() == b.size(); b.minus(A.times(\result)).norm(2) <= b.minus(A.times(col)).norm(2)) *);