derived_type SolveRightSLE | ( | const Matrix< Val, Alloc, Derived_t, Policy > & | refResult | ) | const |
Solves a system of linear equations with the current matrix being multiplied to the solution vector from the right such that the specified result is to be a product.
refResult | is a reference to a vector (represented as a matrix with the only column) that is an expected linear combination of columns of the current matrix. |
Suppose that \(C_{m\times n}\) is the current matrix, \(R_{m\times 1}\) is a matrix that equals to refResult
, and \(X_{n\times 1}\) is the sought result. The method solves the following system of linear equations:
\(C_{m\times n} \cdot X_{n\times 1} = R_{m \times 1}\)
The system need not to be Cramer's.
If the system has no solutions, that is if \(rank\left(A_{m\times n}\right) \neq rank\left(augment\left(A_{m\times n}, R_{m\times 1}\right)\right)\), the method throws std::domain_error exception.
If the system has infinitely many solutions, that is the rank of the system is less than a number columns in the current matrix, then free unknowns are taken zero (i.e. value_type(Chusov::Memory::additive_identity)
, and the corresponding solution is returned.
Chusov::Exceptions::InvalidParameterException | Sizes of input matrices do not match for construction of the system of linear equations |
std::domain_error | The system has no solutions |