org.apache.mahout.math.matrix.linalg
Class LUDecompositionQuick

java.lang.Object
  extended by org.apache.mahout.math.matrix.linalg.LUDecompositionQuick
All Implemented Interfaces:
java.io.Serializable

Deprecated. until unit tests are in place. Until this time, this class/interface is unsupported.

@Deprecated
public class LUDecompositionQuick
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  int[] work2
          Deprecated.  
 
Constructor Summary
LUDecompositionQuick()
          Deprecated. Constructs and returns a new LU Decomposition object with default tolerance 1.0E-9 for singularity detection.
LUDecompositionQuick(double tolerance)
          Deprecated. Constructs and returns a new LU Decomposition object which uses the given tolerance for singularity detection;
 
Method Summary
 void decompose(DoubleMatrix2D A)
          Deprecated. Decomposes matrix A into L and U (in-place).
 void decompose(DoubleMatrix2D A, int semiBandwidth)
          Deprecated. Decomposes the banded and square matrix A into L and U (in-place).
 double det()
          Deprecated. Returns the determinant, det(A).
protected  double[] getDoublePivot()
          Deprecated. Returns pivot permutation vector as a one-dimensional double array
 DoubleMatrix2D getL()
          Deprecated. Returns the lower triangular factor, L.
 DoubleMatrix2D getLU()
          Deprecated. Returns a copy of the combined lower and upper triangular factor, LU.
 int[] getPivot()
          Deprecated. Returns the pivot permutation vector (not a copy of it).
 DoubleMatrix2D getU()
          Deprecated. Returns the upper triangular factor, U.
 boolean isNonsingular()
          Deprecated. Returns whether the matrix is nonsingular (has an inverse).
protected  boolean isNonsingular(DoubleMatrix2D matrix)
          Deprecated. Returns whether the matrix is nonsingular.
protected static DoubleMatrix2D lowerTriangular(DoubleMatrix2D A)
          Deprecated. Modifies the matrix to be a lower triangular matrix.
protected  int m()
          Deprecated.  
protected  int n()
          Deprecated.  
 void setLU(DoubleMatrix2D LU)
          Deprecated. Sets the combined lower and upper triangular factor, LU.
 void solve(DoubleMatrix1D B)
          Deprecated. Solves the system of equations A*X = B (in-place).
 void solve(DoubleMatrix2D B)
          Deprecated. Solves the system of equations A*X = B (in-place).
 java.lang.String toString()
          Deprecated. Returns a String with (propertyName, propertyValue) pairs.
protected static DoubleMatrix2D upperTriangular(DoubleMatrix2D A)
          Deprecated. Modifies the matrix to be an upper triangular matrix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

work2

protected transient int[] work2
Deprecated. 
Constructor Detail

LUDecompositionQuick

public LUDecompositionQuick()
Deprecated. 
Constructs and returns a new LU Decomposition object with default tolerance 1.0E-9 for singularity detection.


LUDecompositionQuick

public LUDecompositionQuick(double tolerance)
Deprecated. 
Constructs and returns a new LU Decomposition object which uses the given tolerance for singularity detection;

Method Detail

decompose

public void decompose(DoubleMatrix2D A)
Deprecated. 
Decomposes matrix A into L and U (in-place). Upon return A is overridden with the result LU, such that L*U = A. Uses a "left-looking", dot-product, Crout/Doolittle algorithm.

Parameters:
A - any matrix.

decompose

public void decompose(DoubleMatrix2D A,
                      int semiBandwidth)
Deprecated. 
Decomposes the banded and square matrix A into L and U (in-place). Upon return A is overridden with the result LU, such that L*U = A. Currently supports diagonal and tridiagonal matrices, all other cases fall through to decompose(DoubleMatrix2D).

Parameters:
semiBandwidth - == 1 --> A is diagonal, == 2 --> A is tridiagonal.
A - any matrix.

det

public double det()
Deprecated. 
Returns the determinant, det(A).

Throws:
java.lang.IllegalArgumentException - if A.rows() != A.columns() (Matrix must be square).

getDoublePivot

protected double[] getDoublePivot()
Deprecated. 
Returns pivot permutation vector as a one-dimensional double array

Returns:
(double) piv

getL

public DoubleMatrix2D getL()
Deprecated. 
Returns the lower triangular factor, L.

Returns:
L

getLU

public DoubleMatrix2D getLU()
Deprecated. 
Returns a copy of the combined lower and upper triangular factor, LU.

Returns:
LU

getPivot

public int[] getPivot()
Deprecated. 
Returns the pivot permutation vector (not a copy of it).

Returns:
piv

getU

public DoubleMatrix2D getU()
Deprecated. 
Returns the upper triangular factor, U.

Returns:
U

isNonsingular

public boolean isNonsingular()
Deprecated. 
Returns whether the matrix is nonsingular (has an inverse).

Returns:
true if U, and hence A, is nonsingular; false otherwise.

isNonsingular

protected boolean isNonsingular(DoubleMatrix2D matrix)
Deprecated. 
Returns whether the matrix is nonsingular.

Returns:
true if matrix is nonsingular; false otherwise.

lowerTriangular

protected static DoubleMatrix2D lowerTriangular(DoubleMatrix2D A)
Deprecated. 
Modifies the matrix to be a lower triangular matrix.

Examples:

3 x 5 matrix:
9, 9, 9, 9, 9
9, 9, 9, 9, 9
9, 9, 9, 9, 9
triang.Upper
==>
3 x 5 matrix:
9, 9, 9, 9, 9
0, 9, 9, 9, 9
0, 0, 9, 9, 9
5 x 3 matrix:
9, 9, 9
9, 9, 9
9, 9, 9
9, 9, 9
9, 9, 9
triang.Upper
==>
5 x 3 matrix:
9, 9, 9
0, 9, 9
0, 0, 9
0, 0, 0
0, 0, 0
3 x 5 matrix:
9, 9, 9, 9, 9
9, 9, 9, 9, 9
9, 9, 9, 9, 9
triang.Lower
==>
3 x 5 matrix:
1, 0, 0, 0, 0
9, 1, 0, 0, 0
9, 9, 1, 0, 0
5 x 3 matrix:
9, 9, 9
9, 9, 9
9, 9, 9
9, 9, 9
9, 9, 9
triang.Lower
==>
5 x 3 matrix:
1, 0, 0
9, 1, 0
9, 9, 1
9, 9, 9
9, 9, 9

Returns:
A (for convenience only).

m

protected int m()
Deprecated. 

n

protected int n()
Deprecated. 

setLU

public void setLU(DoubleMatrix2D LU)
Deprecated. 
Sets the combined lower and upper triangular factor, LU. The parameter is not checked; make sure it is indeed a proper LU decomposition.


solve

public void solve(DoubleMatrix1D B)
Deprecated. 
Solves the system of equations A*X = B (in-place). Upon return B is overridden with the result X, such that L*U*X = B(piv).

Parameters:
B - A vector with B.size() == A.rows().
Throws:
java.lang.IllegalArgumentException - if B.size() != A.rows().
java.lang.IllegalArgumentException - if A is singular, that is, if !isNonsingular().
java.lang.IllegalArgumentException - if A.rows() < A.columns().

solve

public void solve(DoubleMatrix2D B)
Deprecated. 
Solves the system of equations A*X = B (in-place). Upon return B is overridden with the result X, such that L*U*X = B(piv,:).

Parameters:
B - A matrix with as many rows as A and any number of columns.
Throws:
java.lang.IllegalArgumentException - if B.rows() != A.rows().
java.lang.IllegalArgumentException - if A is singular, that is, if !isNonsingular().
java.lang.IllegalArgumentException - if A.rows() < A.columns().

toString

public java.lang.String toString()
Deprecated. 
Returns a String with (propertyName, propertyValue) pairs. Useful for debugging or to quickly get the rough picture. For example,
 rank          : 3
 trace         : 0
 

Overrides:
toString in class java.lang.Object

upperTriangular

protected static DoubleMatrix2D upperTriangular(DoubleMatrix2D A)
Deprecated. 
Modifies the matrix to be an upper triangular matrix.

Returns:
A (for convenience only).


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.