ru.sscc.matrix.solve
Class ReflectionSolver
java.lang.Object
|
+--ru.sscc.matrix.solve.RealDirectSolver
|
+--ru.sscc.matrix.solve.RealDenseSolver
|
+--ru.sscc.matrix.solve.RealCommonSolver
|
+--ru.sscc.matrix.solve.ReflectionSolver
- public class ReflectionSolver
- extends RealCommonSolver
Solves SLAE with a rectangular dense matrix using Hausholder reflections.
If the solution doesn't exist or isn't unique, the normal pseudo-solution
is found by the solve method. If the factorized matrix
has non-maximal range, the CalculatingException
will be thrown
at the end of factorization. You can ignore the exception and solve
the system in this case also.
- See Also:
- Serialized Form
Method Summary |
void |
attach(DenseMatrix matrix)
Attaches a matrix to the solver and sets the initial state
for the solver and matrix. |
protected void |
doBackSubstitution(RealVector source,
RealVector target)
Performs back substitution. |
protected void |
doBackSubstitutionT(RealVector source,
RealVector target)
Performs transposed back substitution. |
protected void |
doFactorize()
Factorizes the matrix using Hausholder reflections. |
void |
transform(DenseMatrix matrix)
Applies the orthogonal transformation to the dense matrix
in the same order as it was done at the factorization of the
attached matrix. |
void |
transform(RealVector vector)
Applies the orthogonal transformation to the vector
in the same order as it was done at the factorization of the
attached matrix (the first step of solving SLAE with already
factorized matrix). |
void |
transformT(RealVector vector)
Applies the transpose orthogonal transformation to the vector. |
Methods inherited from class ru.sscc.matrix.solve.RealCommonSolver |
backSubstitution,
backSubstitutionT,
balance,
balanceVector,
columnFactorized,
ensureTransformable,
factorize,
getReductionAccuracy,
hasBalanceTag,
matrixRange,
nullSpace,
nullSpaceRange,
prepareNullVector,
reuse,
setBalanceTag,
setReductionAccuracy,
solve,
solveT |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ReflectionSolver
public ReflectionSolver()
- Constructor without attachment of a matrix.
ReflectionSolver
public ReflectionSolver(int nRows,
int nColumns)
- Constructs an instance with clear matrix of the double[] type.
- Parameters:
nRows
- the number of rowsnColumns
- the number of columns
ReflectionSolver
public ReflectionSolver(RealContainer entries,
int nRows,
int nColumns)
- Constructs an instance based on a user's real data container.
- Parameters:
entries
- the matrix container consisting of entries
ordered by rowsnRows
- the number of rowsnColumns
- the number of columns
ReflectionSolver
public ReflectionSolver(DenseMatrix matrix)
- Constructs an instance upon a dense matrix.
- Parameters:
matrix
- the rectangular dense matrix
attach
public void attach(DenseMatrix matrix)
- Attaches a matrix to the solver and sets the initial state
for the solver and matrix. The matrix is set to be algebraic and
the solver factorize and balance tags are turned off.
- Overrides:
- attach in class RealCommonSolver
doFactorize
protected void doFactorize()
- Factorizes the matrix using Hausholder reflections.
- Overrides:
- doFactorize in class RealCommonSolver
doBackSubstitution
protected void doBackSubstitution(RealVector source,
RealVector target)
- Performs back substitution.
- Overrides:
- doBackSubstitution in class RealCommonSolver
- Tags copied from class: RealCommonSolver
- Parameters:
source
- the source vector (the range entries are used)target
- the target vector (the range entries are filled in)
doBackSubstitutionT
protected void doBackSubstitutionT(RealVector source,
RealVector target)
- Performs transposed back substitution.
- Overrides:
- doBackSubstitutionT in class RealCommonSolver
- Tags copied from class: RealCommonSolver
- Parameters:
source
- the source vector (the range entries are used)
$param target the target vector (the range entries are filled in)
transform
public void transform(DenseMatrix matrix)
- Applies the orthogonal transformation to the dense matrix
in the same order as it was done at the factorization of the
attached matrix.
- Overrides:
- transform in class RealCommonSolver
transform
public void transform(RealVector vector)
- Applies the orthogonal transformation to the vector
in the same order as it was done at the factorization of the
attached matrix (the first step of solving SLAE with already
factorized matrix).
- Overrides:
- transform in class RealCommonSolver
transformT
public void transformT(RealVector vector)
- Applies the transpose orthogonal transformation to the vector.
- Overrides:
- transformT in class RealCommonSolver