org.ojalgo.matrix.decomposition
Class BidiagonalDecomposition<N extends Number>

java.lang.Object
  extended by org.ojalgo.matrix.decomposition.BidiagonalDecomposition<N>
All Implemented Interfaces:
Bidiagonal<N>, MatrixDecomposition<N>

public abstract class BidiagonalDecomposition<N extends Number>
extends Object
implements Bidiagonal<N>

You create instances of (some subclass of) this class by calling one of the static factory methods: makeBig(), makeComplex() or makePrimitive().

Author:
apete

Method Summary
 boolean compute(Access2D<?> aStore)
           
 boolean equals(MatrixDecomposition<N> aDecomp, NumberContext aCntxt)
           
 boolean equals(MatrixStore<N> aStore, NumberContext aCntxt)
           
 boolean equals(Object someObj)
           
 MatrixStore<N> getD()
           
 MatrixStore<N> getInverse()
          The output must be a "right inverse" and a "generalised inverse".
 MatrixStore<N> getInverse(DecompositionStore<N> preallocated)
           Implementiong this method is optional.
 MatrixStore<N> getQ1()
           
 MatrixStore<N> getQ2()
           
 boolean isAspectRatioNormal()
           
 boolean isComputed()
           
 boolean isFullSize()
           
 boolean isSolvable()
           
 boolean isUpper()
           
static
<N extends Number>
Bidiagonal<N>
make(Access2D<N> aTypical)
           
static Bidiagonal<BigDecimal> makeBig()
           
static Bidiagonal<ComplexNumber> makeComplex()
           
static Bidiagonal<Double> makePrimitive()
           
 MatrixStore<N> reconstruct()
           
 void reset()
          Delete computed results, and resets attributes to default values
 MatrixStore<N> solve(MatrixStore<N> aRHS)
          [A][X]=[B] or [this][return]=[aRHS]
 MatrixStore<N> solve(MatrixStore<N> aRHS, DecompositionStore<N> preallocated)
           Implementiong this method is optional.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ojalgo.matrix.decomposition.MatrixDecomposition
equals, getInverse, getInverse, isComputed, solve, solve
 

Method Detail

make

public static final <N extends Number> Bidiagonal<N> make(Access2D<N> aTypical)

makeBig

public static final Bidiagonal<BigDecimal> makeBig()

makeComplex

public static final Bidiagonal<ComplexNumber> makeComplex()

makePrimitive

public static final Bidiagonal<Double> makePrimitive()

compute

public final boolean compute(Access2D<?> aStore)
Specified by:
compute in interface MatrixDecomposition<N extends Number>
Parameters:
aStore - A matrix to decompose
Returns:
true if the computation suceeded; false if not

equals

public final boolean equals(MatrixStore<N> aStore,
                            NumberContext aCntxt)
Specified by:
equals in interface MatrixDecomposition<N extends Number>

getD

public final MatrixStore<N> getD()
Specified by:
getD in interface Bidiagonal<N extends Number>

getQ1

public final MatrixStore<N> getQ1()
Specified by:
getQ1 in interface Bidiagonal<N extends Number>

getQ2

public final MatrixStore<N> getQ2()
Specified by:
getQ2 in interface Bidiagonal<N extends Number>

isFullSize

public final boolean isFullSize()
Specified by:
isFullSize in interface MatrixDecomposition<N extends Number>
Returns:
True if the implementation generates a full sized decomposition.

isSolvable

public final boolean isSolvable()
Specified by:
isSolvable in interface MatrixDecomposition<N extends Number>
Returns:
true if it is ok to call MatrixDecomposition.solve(MatrixStore) (computation was successful); false if not
See Also:
MatrixDecomposition.solve(MatrixStore), MatrixDecomposition.isComputed()

isUpper

public final boolean isUpper()
Specified by:
isUpper in interface Bidiagonal<N extends Number>

reconstruct

public final MatrixStore<N> reconstruct()
Specified by:
reconstruct in interface MatrixDecomposition<N extends Number>

reset

public final void reset()
Description copied from interface: MatrixDecomposition
Delete computed results, and resets attributes to default values

Specified by:
reset in interface MatrixDecomposition<N extends Number>

getInverse

public MatrixStore<N> getInverse()
Description copied from interface: MatrixDecomposition
The output must be a "right inverse" and a "generalised inverse".

See Also:
BasicMatrix.invert()

getInverse

public MatrixStore<N> getInverse(DecompositionStore<N> preallocated)
Description copied from interface: MatrixDecomposition

Implementiong this method is optional.

Exactly how a specific implementation makes use of preallocated is not specified by this interface. It must be documented for each implementation.

Should produce the same results as calling MatrixDecomposition.getInverse().

Parameters:
preallocated - Preallocated memory for the results, possibly some intermediate results. You must assume this is modified, but you cannot assume it will contain the full/final/correct solution.
Returns:
The inverse

solve

public MatrixStore<N> solve(MatrixStore<N> aRHS)
Description copied from interface: MatrixDecomposition
[A][X]=[B] or [this][return]=[aRHS]


solve

public MatrixStore<N> solve(MatrixStore<N> aRHS,
                            DecompositionStore<N> preallocated)
Description copied from interface: MatrixDecomposition

Implementiong this method is optional.

Exactly how a specific implementation makes use of preallocated is not specified by this interface. It must be documented for each implementation.

Should produce the same results as calling MatrixDecomposition.solve(MatrixStore).

Parameters:
aRHS - The Right Hand Side, wont be modfied
preallocated - Preallocated memory for the results, possibly some intermediate results. You must assume this is modified, but you cannot assume it will contain the full/final/correct solution.
Returns:
The solution

equals

public final boolean equals(MatrixDecomposition<N> aDecomp,
                            NumberContext aCntxt)
Specified by:
equals in interface MatrixDecomposition<N extends Number>

equals

public boolean equals(Object someObj)
Overrides:
equals in class Object

isAspectRatioNormal

public boolean isAspectRatioNormal()

isComputed

public final boolean isComputed()
Specified by:
isComputed in interface MatrixDecomposition<N extends Number>
Returns:
true if computation has been attemped; false if not.
See Also:
MatrixDecomposition.compute(Access2D), MatrixDecomposition.isSolvable()