NMath Reference Guide

## Constrained |

Class for solver constrained least squares problems.

Inheritance Hierarchy

Syntax

The ConstrainedLeastSquares type exposes the following members.

Constructors

Name | Description | |
---|---|---|

ConstrainedLeastSquares | Constructs an instance of ConstrainedLeastSquares. |

Properties

Name | Description | |
---|---|---|

Iterations | Gets the number of iterations performed by the most recent solve. | |

ResidualNorm | Gets the Euclidean norm of the Residual vector. You must call one of the Solve methods before accessing. | |

Residuals | Gets the vector of residuals for the computed solution Residuals = Ax - b, where x is the computed solution. You must call one of the Solve methods before accessing. | |

X | Gets the calcluated solution of the most recently solved constrained least squares problem. You must call one of the Solve methods before accessing. |

Methods

Name | Description | |
---|---|---|

Clone | Returns a deep copy of self. | |

GetQuadraticProblem | Reformulates the given constrained least squares problem as a Quadratic Programming problem. | |

Solve(ConstrainedLeastSquaresProblem) | Solves the given least squares problem using the default quadratic programming solver. | |

Solve(ConstrainedLeastSquaresProblem, ActiveSetQPSolver, DoubleVector) | Solves the given least squares problem using an active set quadratic programming solver. | |

Solve(ConstrainedLeastSquaresProblem, InteriorPointQPSolver, InteriorPointQPSolverParams) | Solves the given least squares problem using an interior point quadratic programming solver. |

Remarks

Minimize ||Ax - b||^2
/// Subject to

ai'x = bi, for i in E,

ai'x >= bi, for i in I

where A is an mxn matrix, b is an m-vector, each ai is an n-vector and each bi is a scalar. ||.||^2 denotes the Euclidean norm squared.

ai'x = bi, for i in E,

ai'x >= bi, for i in I

where A is an mxn matrix, b is an m-vector, each ai is an n-vector and each bi is a scalar. ||.||^2 denotes the Euclidean norm squared.

See Also