 | ConstrainedLeastSquaresSolve(ConstrainedLeastSquaresProblem, ActiveSetQPSolver, DoubleVector) Method |
Solves the given least squares problem using an active set quadratic
programming solver.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntaxpublic bool Solve(
ConstrainedLeastSquaresProblem problem,
ActiveSetQPSolver solver,
DoubleVector x0 = null
)
Public Function Solve (
problem As ConstrainedLeastSquaresProblem,
solver As ActiveSetQPSolver,
Optional x0 As DoubleVector = Nothing
) As Boolean
public:
bool Solve(
ConstrainedLeastSquaresProblem^ problem,
ActiveSetQPSolver^ solver,
DoubleVector^ x0 = nullptr
)
member Solve :
problem : ConstrainedLeastSquaresProblem *
solver : ActiveSetQPSolver *
?x0 : DoubleVector
(* Defaults:
let _x0 = defaultArg x0 null
*)
-> bool
Parameters
- problem ConstrainedLeastSquaresProblem
- A constrained least squares problem.
- solver ActiveSetQPSolver
- An instance of the active set QP solver to use.
- x0 DoubleVector (Optional)
- Optional starting point for calculating the solution. If
none is provided the algorithm will pick one.
Return Value
Booleantrue if the solver is successful
ExceptionsException | Condition |
---|
MismatchedSizeException | Thrown if the dimension
of the matrix A and the vector b do not match for the problem
Ax = b. |
NMathException | Thrown if there are more variables
than equations (an under-determined system). |
RemarksIf your problem is has more variables than equations (an
under-determined solver) you must use the Solver method
that uses the InteriorPointQPSolver quadratic programming solver.
See Also