|
JADE v6.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dautelle.realtime.RealtimeObject
com.dautelle.math.LUDecomposition
This class represents the decomposition of a Matrix
into
a product of lower and upper triangular matrices
(L and U, respectively).
This decomposition is typically used to resolve linear systems
of equations (Gaussian elimination) or to calculate the determinant
of a square Matrix
(O(n³)
).
Numerical stability is guaranteed through pivoting if the
Operable
elements of this matrix are derived
from java.lang.Number
. For others elements types,
numerical stability can be ensured by setting the appropriate
pivot comparator (see setPivotComparator(java.util.Comparator)
).
Instances of this class are created using the Matrix.lu()
factory methods.
Nested Class Summary |
Nested classes inherited from class com.dautelle.realtime.RealtimeObject |
RealtimeObject.Factory |
Field Summary | |
static java.util.Comparator |
NUMBER_COMPARATOR
Holds the comparator for pivoting java.lang.Number
instances. |
Method Summary | |
Operable |
determinant()
Returns the determinant of the Matrix having this
LUDecomposition . |
java.lang.Object |
export()
Exports this object out of the current pool context. |
Matrix |
inverse()
Returns the solution X of the equation: A * X = Identity with this = A.lu() using back and forward substitutions. |
void |
setPivotComparator(java.util.Comparator cmp)
Sets the local comparator used
for pivoting during LU decomposition (default
NUMBER_COMPARATOR ). |
Matrix |
solve(Matrix B)
Returns the solution X of the equation: A * X = B with this = A.lu() using back and forward substitutions. |
java.lang.Object |
toHeap()
Moves this object to the heap. |
Methods inherited from class com.dautelle.realtime.RealtimeObject |
clone, isLocalObject, isPoolObject, recycle |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.util.Comparator NUMBER_COMPARATOR
java.lang.Number
instances.
Method Detail |
public void setPivotComparator(java.util.Comparator cmp)
local
comparator used
for pivoting during LU decomposition (default
NUMBER_COMPARATOR
).
cmp
- the comparator for pivoting.public Matrix solve(Matrix B)
this = A.lu()
using back and forward substitutions.
B
- the input vector.
DimensionException
- if
A.getRowDimension() != B.getRowDimension()
.public Matrix inverse()
this = A.lu()
using back and forward substitutions.
This method uses PoolContext
internally.
this.solve(Identity)
public Operable determinant()
Matrix
having this
LUDecomposition
.
public java.lang.Object export()
Realtime
Realtime
members are exported as well (recursion).
This method affects only objects belonging to the current pool context.
To avoid pool depletion, a "free" object from the outer pool
is moved to replace the object being exported.
export
in interface Realtime
export
in class RealtimeObject
public java.lang.Object toHeap()
Realtime
Realtime
members are moved to the heap as well (recursion).
This method affects only objects belonging to a pool context
(current or not).
toHeap
in interface Realtime
toHeap
in class RealtimeObject
|
JADE v6.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |