Darwin  1.10(beta)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
drwnSparseLPSolver Class Reference

Solves linear programs with sparse equality constraints. More...

Public Member Functions

 drwnSparseLPSolver (const VectorXd &c, const SparseMatrix< double > &A, const VectorXd &b)
 construct a problem $min. c^T x \text{ s.t. } Ax = b, x \geq 0$
 
 drwnSparseLPSolver (const VectorXd &c, const SparseMatrix< double > &A, const VectorXd &b, const VectorXd &lb, const VectorXd &ub)
 construct a problem $min. c^T x \text{ s.t. } Ax = b, l \leq x \leq u$
 
 ~drwnSparseLPSolver ()
 destructor
 
void initialize (const VectorXd &x)
 initialization of a feasible point
 
double solve ()
 solve and return objective (solution can be obtained from solution function) More...
 
const VectorXd & solution () const
 return the current estimate of the solution
 
int size () const
 return the number of dimensions of the state space
 
double operator[] (unsigned i) const
 access the i-th dimension of the current solution
 

Protected Member Functions

bool isUnbounded (unsigned i) const
 returns true if the i-th variable is unbounded
 
bool isWithinBounds (const VectorXd &x) const
 returns true if a point is strictly within the lower and upper bounds
 
double barrierFunction (const VectorXd &x) const
 computes the barrier function for a given assignment
 

Protected Attributes

VectorXd _c
 linear term in the objective function
 
const SparseMatrix< double > & _A
 linear equality constraint matrix
 
VectorXd _b
 linear equality constraint vector
 
VectorXd _lb
 lower bound for each variable (-DRWN_DBL_MAX for unbounded below)
 
VectorXd _ub
 upped bound for each variable (DRWN_DBL_MAX for unbounded above)
 
VectorXd _x
 current estimate of solution
 

Detailed Description

Solves linear programs with sparse equality constraints.

Todo:
refactor drwnLPSolver code to use templated sparse/dense matrix
See Also
drwnLPSolver

Member Function Documentation

double drwnSparseLPSolver::solve ( )

solve and return objective (solution can be obtained from solution function)

Todo:
solve with blockwise elimination

The documentation for this class was generated from the following files: