KrisLibrary
1.0.0
|
Solves a linear program with regularization. More...
#include <RegularizedLinearProgram.h>
Public Member Functions | |
void | ResizeObjective (int m, int n) |
void | ResizeConstraints (int m, int n) |
bool | IsValid () const |
void | Print (std::ostream &out) const |
void | Assemble () |
converts these matrices into lp form | |
LinearProgram::Result | Solve (Vector &x) |
solves the assembled matrices | |
Real | Objective (const Vector &x) const |
Real | Norm (const Vector &x) const |
Real | ObjectiveNormSum (const Vector &x) const |
Public Member Functions inherited from Optimization::LinearConstraints | |
void | Resize (int m, int n) |
void | AddConstraint (Real qi, const Vector &Ai, Real pi) |
void | AddConstraints (int num) |
void | AddVariable (Real li=-Inf, Real ui=Inf) |
void | AddVariables (int num) |
bool | IsValid () const |
BoundType | ConstraintType (int i) const |
BoundType | VariableType (int j) const |
bool | HasEqualities () const |
bool | HasInequalities () const |
bool | HasBounds () const |
Real | EqualityError (const Vector &x) const |
Real | InequalityMargin (const Vector &x) const |
Real | BoundMargin (const Vector &x) const |
Real | InfeasibilityMeasure (const Vector &x) const |
bool | SatisfiesEqualities (const Vector &x, Real tol=Epsilon) const |
bool | SatisfiesInequalities (const Vector &x) const |
bool | SatisfiesBounds (const Vector &x) const |
bool | IsFeasible (const Vector &x, Real equalityTol=Epsilon) const |
void | ProjectDirection (Vector &v) const |
void | Print (std::ostream &out) const |
void | GetSimpleForm (Matrix &Aeq, Vector &beq, Matrix &Aineq, Vector &bineq) const |
void | SetSimpleForm (const Matrix &Aeq, const Vector &beq, const Matrix &Aineq, const Vector &bineq) |
void | SetRef (const LinearConstraints &) |
void | Copy (const LinearConstraints &) |
void | Swap (LinearConstraints &) |
const LinearConstraints & | operator= (const LinearConstraints &lp) |
Public Attributes | |
Vector | c |
Real | norm |
Matrix | C |
Vector | d |
int | verbose |
LinearProgram | lp |
Public Attributes inherited from Optimization::LinearConstraints | |
Matrix | A |
Vector | q |
Vector | p |
Vector | l |
Vector | u |
Additional Inherited Members | |
Public Types inherited from Optimization::LinearConstraints | |
enum | BoundType { Free, LowerBound, UpperBound, Bounded, Fixed } |
Static Public Member Functions inherited from Optimization::LinearConstraints | |
static bool | HasLowerBound (BoundType b) |
static bool | HasUpperBound (BoundType b) |
Solves a linear program with regularization.
Problem is of the form min c^t x + ||C x - d|| s.t. q <= A x <= p l <= x <= u where ||.|| is either a 1 or infinity norm