|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ru.sscc.matrix.solve.RealDirectSolver | +--ru.sscc.matrix.solve.RealDenseSolver
Basic abstract class for direct solvers of SLAE with a real dense matrix.
Field Summary | |
protected DenseMatrix |
matrix
The attached matrix. |
Constructor Summary | |
RealDenseSolver()
|
Method Summary | |
void |
attach(DenseMatrix matrix)
Attaches a matrix to the solver and sets the initial state for the solver and matrix. |
java.lang.Object |
clone()
Returns a clear clone of the solver without attached matrix. |
static void |
forwardSubstitution(RealContainer entries,
int startIndex,
int rowStep,
int columnStep,
RealPointer diag,
RealPointer source,
RealPointer target,
int size)
Uxecutes the forward substitution algorithm corresponding to the solving of SLAE with the lower triangular matrix. |
DenseMatrix |
getMatrix()
Returns the matrix attached to the solver. |
void |
reuse()
Clears the factorization tag to reuse the attached matrix once more. |
static void |
solveLowerTriangular(DenseMatrix matrix,
boolean hasUnitDiagonal,
RealVector source,
RealVector target)
Solves SLAE with the lower triangular matrix stored in the square dense matrix. |
static void |
solveUpperTriangular(DenseMatrix matrix,
boolean hasUnitDiagonal,
RealVector source,
RealVector target)
Solves SLAE with the upper triangular matrix stored in the square dense matrix. |
int |
sourceSize()
Returns a size of right-hand side (rows number). |
int |
targetSize()
Returns a size of solution (columns number). |
Methods inherited from class ru.sscc.matrix.solve.RealDirectSolver |
constructInverse,
constructRefinedInverse,
ensureFactorized,
factorize,
isFactorized,
setFactorized,
solve,
solveAndRefine |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected DenseMatrix matrix
Constructor Detail |
public RealDenseSolver()
Method Detail |
public void attach(DenseMatrix matrix)
public java.lang.Object clone()
public final DenseMatrix getMatrix()
public int sourceSize()
public int targetSize()
public void reuse()
public static void solveLowerTriangular(DenseMatrix matrix, boolean hasUnitDiagonal, RealVector source, RealVector target)
matrix
- the square dense matrix containing the required triangular
matrix in its lower cornerhasUnitDiagonal
- is true, if the main matrix diagonal has unit values
and isn't stored in the matrixsource
- a source vector (the right-hand side of SLAE)target
- a target vector to write the solutionpublic static void solveUpperTriangular(DenseMatrix matrix, boolean hasUnitDiagonal, RealVector source, RealVector target)
matrix
- the square dense matrix containing the required triangular
matrix in its upper cornerhasUnitDiagonal
- is true, if the main matrix diagonal has unit values
and isn't stored in the matrixsource
- the source vector (the right-hand side of SLAE)target
- the target vector to write the solutionpublic static void forwardSubstitution(RealContainer entries, int startIndex, int rowStep, int columnStep, RealPointer diag, RealPointer source, RealPointer target, int size)
Implementation note: The pointers to the source and target vectors may be identic. The pointers passed as parameters are changed while the method is executed and not restored.
entries
- the matrix containerstartIndex
- the index of (0,0)-th matrix entry in the containerrowStep
- the distance between two neighbour entries of
the same columncolumnStep
- the distance between two neighbour entries of
the same rowdiag
- the pointer to the vector of main diagonal entriessource
- the pointer to the source vector (the right hand side
of SLAE)target
- the pointer to the target vector to write the solutionsize
- the matrix size (the number of linear equations)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |