org.apache.commons.math3.linear
Class RRQRDecomposition.Solver

java.lang.Object
  extended by org.apache.commons.math3.linear.RRQRDecomposition.Solver
All Implemented Interfaces:
DecompositionSolver
Enclosing class:
RRQRDecomposition

private static class RRQRDecomposition.Solver
extends Object
implements DecompositionSolver

Specialized solver.


Field Summary
private  RealMatrix p
          A permutation matrix for the pivots used in the QR decomposition
private  DecompositionSolver upper
          Upper level solver.
 
Constructor Summary
private RRQRDecomposition.Solver(DecompositionSolver upper, RealMatrix p)
          Build a solver from decomposed matrix.
 
Method Summary
 RealMatrix getInverse()
          Get the inverse (or pseudo-inverse) of the decomposed matrix.
 boolean isNonSingular()
          Check if the decomposed matrix is non-singular.
 RealMatrix solve(RealMatrix b)
          Solve the linear equation A × X = B for matrices A.
 RealVector solve(RealVector b)
          Solve the linear equation A × X = B for matrices A.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

upper

private final DecompositionSolver upper
Upper level solver.


p

private RealMatrix p
A permutation matrix for the pivots used in the QR decomposition

Constructor Detail

RRQRDecomposition.Solver

private RRQRDecomposition.Solver(DecompositionSolver upper,
                                 RealMatrix p)
Build a solver from decomposed matrix.

Parameters:
upper - upper level solver.
p - permutation matrix
Method Detail

isNonSingular

public boolean isNonSingular()
Check if the decomposed matrix is non-singular.

Specified by:
isNonSingular in interface DecompositionSolver
Returns:
true if the decomposed matrix is non-singular.

solve

public RealVector solve(RealVector b)
Solve the linear equation A × X = B for matrices A.

The A matrix is implicit, it is provided by the underlying decomposition algorithm.

Specified by:
solve in interface DecompositionSolver
Parameters:
b - right-hand side of the equation A × X = B
Returns:
a vector X that minimizes the two norm of A × X - B

solve

public RealMatrix solve(RealMatrix b)
Solve the linear equation A × X = B for matrices A.

The A matrix is implicit, it is provided by the underlying decomposition algorithm.

Specified by:
solve in interface DecompositionSolver
Parameters:
b - right-hand side of the equation A × X = B
Returns:
a matrix X that minimizes the two norm of A × X - B

getInverse

public RealMatrix getInverse()
Get the inverse (or pseudo-inverse) of the decomposed matrix.

Specified by:
getInverse in interface DecompositionSolver
Returns:
inverse matrix


Copyright (c) 2003-2013 Apache Software Foundation