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 MustOverride Function LeastSquaresSolve ( _ rightHandSide As GeneralVector, _ overwrite As Boolean _ ) As GeneralVector |
| C# |
|---|
public abstract GeneralVector LeastSquaresSolve ( GeneralVector rightHandSide, bool overwrite ) |
| C++ |
|---|
public: virtual GeneralVector^ LeastSquaresSolve ( GeneralVector^ rightHandSide, bool overwrite ) abstract |
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. (This is the default.) If true, the vector rightHandSide is overwritten by the solution.
Return Value
A GeneralVector containing the least squares solution of the system of simultaneous linear equations.
Exceptions
| Exception | Condition |
|---|---|
| DimensionMismatchException | The length of rightHandSide does not equal the number of rows of the matrix underlying this system of equations. |