Solves the system of simultaneous linear equations for the specified right-hand side GeneralMatrix 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 GeneralMatrix, _
	overwrite As Boolean _
) As GeneralMatrix
C#
public override GeneralMatrix Solve (
	GeneralMatrix rightHandSide,
	bool overwrite
)
C++
public:
virtual GeneralMatrix^ Solve (
	GeneralMatrix^ rightHandSide, 
	bool overwrite
) override

Parameters

rightHandSide (Extreme.Mathematics.LinearAlgebra.GeneralMatrix)
A GeneralMatrix.
overwrite (System.Boolean)
If false, a new GeneralMatrix instance containing the solution to the system of equations is returned. (This is the default.) If true, the matrix rightHandSide is overwritten by the solution.

Return Value

A GeneralMatrix containing the solution of the system of simultaneous linear equations.

Remarks

The number of rows in rightHandSide must equal the number of rows in the GeneralMatrix underlying the system.

If the matrix is singular, a solution may not exist. In this case, a MatrixSingularException is thrown.

Exceptions

ExceptionCondition
ArgumentNullExceptionrightHandSide is nullNothingnullptr.
DimensionMismatchExceptionThe number of rows in rightHandSide does not equal the number of rows in the matrix underlying this system of equations.

-or-

The matrix is not square.

MatrixSingularExceptionThe matrix underlying the system of simultaneous linear equations is singular. A solution could not be found.

See Also