Solves the system of linear equations in the
least-squares sense for the specified
right-hand side Vector.
Namespace: Extreme.Mathematics.LinearAlgebra
Assembly: Extreme.Numerics (Extreme.Numerics)
Syntax
| Visual Basic (Declaration) |
|---|
Public Function LeastSquaresSolve ( _ rightHandSide As GeneralVector, _ overwrite As Boolean _ ) As GeneralVector |
| C# |
|---|
public GeneralVector LeastSquaresSolve ( GeneralVector rightHandSide, bool overwrite ) |
| C++ |
|---|
public: virtual GeneralVector^ LeastSquaresSolve ( GeneralVector^ rightHandSide, bool overwrite ) sealed |
Parameters
- rightHandSide (Extreme.Mathematics.LinearAlgebra.GeneralVector)
- A GeneralVector.
- overwrite (System.Boolean)
- if true, the vector rightHandSide is overwritten by the solution to the system of equations. If false, a new Vector containing the solution is returned.
Return Value
A GeneralVector containing the least squares solution of the system of simultaneous linear equations.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | rightHandSide is nullNothingnullptr. |
| DimensionMismatchException | The length of rightHandSide does not equal the number of rows of the matrix. |