Solves the system of simultaneous linear equations for the specified
right-hand side GeneralVector and optionally overwrites
the right-hand side with the solution.
Namespace: Extreme.Mathematics.LinearAlgebra
Assembly: Extreme.Numerics (Extreme.Numerics)
Syntax
| Visual Basic (Declaration) |
|---|
Public Overrides Function Solve ( _ rightHandSide As GeneralVector, _ overwrite As Boolean _ ) As GeneralVector |
| C# |
|---|
public override GeneralVector Solve ( GeneralVector rightHandSide, bool overwrite ) |
| C++ |
|---|
public: virtual GeneralVector^ Solve ( GeneralVector^ rightHandSide, bool overwrite ) override |
Parameters
- rightHandSide (Extreme.Mathematics.LinearAlgebra.GeneralVector)
- A Vector.
- overwrite (System.Boolean)
- If false, a new Vector instance containing the solution to the system of equations is returned. If false, the vector rightHandSide is overwritten by the solution.
Return Value
A GeneralVector containing the solution of the system of simultaneous linear equations.
Remarks
The number of elements in rightHandSide
must equal the number of rows in the SymmetricMatrix.
If the matrix is singular, a solution may not exist. In this case, a MatrixSingularException is thrown.
This method uses the LAPACK routine DPOTRS.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | rightHandSide is nullNothingnullptr. |
| DimensionMismatchException | The length of rightHandSide does not equal the number of rows in the matrix. |
| MatrixSingularException | The matrix is singular. A solution could not be found. |