org.ejml.alg.dense.linsol.lu
Class LinearSolverLuKJI

java.lang.Object
  extended by org.ejml.alg.dense.linsol.LinearSolverAbstract
      extended by org.ejml.alg.dense.linsol.lu.LinearSolverLuBase
          extended by org.ejml.alg.dense.linsol.lu.LinearSolverLuKJI
All Implemented Interfaces:
LinearSolver<DenseMatrix64F>

public class LinearSolverLuKJI
extends LinearSolverLuBase

To avoid cpu cache issues the order in which the arrays are traversed have been changed. There seems to be no performance benit relative to LinearSolverLu in this approach and b and x can't be the same instance, which means it has slightly less functionality.

Author:
Peter Abeles

Field Summary
 
Fields inherited from class org.ejml.alg.dense.linsol.lu.LinearSolverLuBase
decomp
 
Fields inherited from class org.ejml.alg.dense.linsol.LinearSolverAbstract
A, numCols, numRows
 
Constructor Summary
LinearSolverLuKJI(LUDecompositionBase decomp)
           
 
Method Summary
 boolean setA(DenseMatrix64F A)
           Specifies the A matrix in the linear equation.
 void solve(DenseMatrix64F b, DenseMatrix64F x)
          An other implementation of solve() that processes the matrices in a different order.
 
Methods inherited from class org.ejml.alg.dense.linsol.lu.LinearSolverLuBase
improveSol, invert, modifiesA, modifiesB, quality
 
Methods inherited from class org.ejml.alg.dense.linsol.LinearSolverAbstract
_setA, getA
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearSolverLuKJI

public LinearSolverLuKJI(LUDecompositionBase decomp)
Method Detail

setA

public boolean setA(DenseMatrix64F A)
Description copied from interface: LinearSolver

Specifies the A matrix in the linear equation. A reference might be saved and it might also be modified depending on the implementation. If it is modified then LinearSolver.modifiesA() will return true.

If this value returns true that does not guarantee a valid solution was generated. This is because some decompositions don't detect singular matrices.

Specified by:
setA in interface LinearSolver<DenseMatrix64F>
Overrides:
setA in class LinearSolverLuBase
Parameters:
A - The 'A' matrix in the linear equation. Might be modified or save the reference.
Returns:
true if it can be processed.

solve

public void solve(DenseMatrix64F b,
                  DenseMatrix64F x)
An other implementation of solve() that processes the matrices in a different order. It seems to have the same runtime performance as solve(org.ejml.data.DenseMatrix64F, org.ejml.data.DenseMatrix64F) and is more complicated. It is being kept around to avoid future replication of work.

Parameters:
b - A matrix that is n by m. Not modified.
x - An n by m matrix where the solution is writen to. Modified.


Copyright © 2012. All Rights Reserved.