org.ejml.alg.dense.linsol.qr
Class AdjLinearSolverQr

java.lang.Object
  extended by org.ejml.alg.dense.linsol.LinearSolverAbstract
      extended by org.ejml.alg.dense.linsol.qr.LinearSolverQr
          extended by org.ejml.alg.dense.linsol.qr.AdjLinearSolverQr
All Implemented Interfaces:
AdjustableLinearSolver, LinearSolver<DenseMatrix64F>

public class AdjLinearSolverQr
extends LinearSolverQr
implements AdjustableLinearSolver

A solver for QR decomposition that can efficiently modify the previous decomposition when data is added or removed.

Author:
Peter Abeles

Field Summary
 
Fields inherited from class org.ejml.alg.dense.linsol.qr.LinearSolverQr
maxCols, maxRows, Q, R
 
Fields inherited from class org.ejml.alg.dense.linsol.LinearSolverAbstract
numCols, numRows
 
Constructor Summary
AdjLinearSolverQr()
           
 
Method Summary
 boolean addRowToA(double[] A_row, int rowIndex)
          Adds a row to A.
 DenseMatrix64F getA()
          Compute the A matrix from the Q and R matrices.
 boolean removeRowFromA(int index)
          Removes a row from A.
 void setMaxSize(int maxRows, int maxCols)
          Changes the size of the matrix it can solve for
 
Methods inherited from class org.ejml.alg.dense.linsol.qr.LinearSolverQr
modifiesA, modifiesB, quality, setA, solve
 
Methods inherited from class org.ejml.alg.dense.linsol.LinearSolverAbstract
_setA, invert
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ejml.alg.dense.linsol.LinearSolver
invert, modifiesA, modifiesB, quality, setA, solve
 

Constructor Detail

AdjLinearSolverQr

public AdjLinearSolverQr()
Method Detail

setMaxSize

public void setMaxSize(int maxRows,
                       int maxCols)
Description copied from class: LinearSolverQr
Changes the size of the matrix it can solve for

Overrides:
setMaxSize in class LinearSolverQr
Parameters:
maxRows - Maximum number of rows in the matrix it will decompose.
maxCols - Maximum number of columns in the matrix it will decompose.

getA

public DenseMatrix64F getA()
Compute the A matrix from the Q and R matrices.

Overrides:
getA in class LinearSolverAbstract
Returns:
The A matrix.

addRowToA

public boolean addRowToA(double[] A_row,
                         int rowIndex)
Description copied from interface: AdjustableLinearSolver
Adds a row to A. This has the same effect as creating a new A and calling LinearSolver.setA(T).

Specified by:
addRowToA in interface AdjustableLinearSolver
Parameters:
A_row - The row in A.
rowIndex - Where the row appears in A.
Returns:
if it succeeded or not.

removeRowFromA

public boolean removeRowFromA(int index)
Description copied from interface: AdjustableLinearSolver
Removes a row from A. This has the same effect as creating a new A and calling LinearSolver.setA(T).

Specified by:
removeRowFromA in interface AdjustableLinearSolver
Parameters:
index - which row is removed from A.
Returns:
If it succeeded or not.


Copyright © 2012. All Rights Reserved.