Limbo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Classes | Enumerations | Functions
limbo::solvers Namespace Reference

namespace for Limbo.Solvers More...

Namespaces

 lpmcf
 namespace for Limbo.Solvers.lpmcf
 

Classes

class  CapacityScaling
 Capacity scaling algorithm for min-cost flow. More...
 
struct  CompareTermByVariable
 Comapre term by variable. More...
 
class  CostScaling
 Cost scaling algorithm for min-cost flow. More...
 
class  CycleCanceling
 Cycle canceling algorithm for min-cost flow. More...
 
class  DualMinCostFlow
 LP solved with min-cost flow. A better implementation of limbo::solvers::lpmcf::LpDualMcf. More...
 
class  FeasibleSearcher
 Base heuristic to search for feasible solutions. More...
 
class  GurobiLinearApi
 Gurobi API with limbo::solvers::LinearModel. More...
 
class  GurobiParameters
 Base class for custom Gurobi parameters. More...
 
class  L2NormScaler
 Scaling scheme with default L2 norm scaling. More...
 
class  LagMultiplierUpdater
 A base helper function object to update lagrangian multipliers using subgradient descent. All other schemes can be derived from this class. More...
 
class  LinearConstraint
 Describe linear constraint. More...
 
class  LinearExpression
 Describe linear expressions in optimization problem. More...
 
class  LinearModel
 model to describe an optimization problem More...
 
class  LinearTerm
 Linear term. More...
 
class  LPSolveLinearApi
 LPSolve API with limbo::solvers::LinearModel. More...
 
class  LPSolveParameters
 Base class for custom LPSolve parameters. More...
 
struct  MatrixCSR
 Compressed sparse row (CSR) matrix. More...
 
class  MinCoefficientScaler
 Scaling scheme with minimum coefficient in an expression. More...
 
class  MinCostFlow
 LP solved with min-cost flow. More...
 
class  MinCostFlowSolver
 A base class of min-cost flow solver. More...
 
class  MultiKnapsackLagRelax
 Solve multiple knapsack problem with lagrangian relaxation. More...
 
class  NetworkSimplex
 Network simplex algorithm for min-cost flow. More...
 
class  ProblemScaler
 Base class for scaling scheme with default no scaling. More...
 
class  SearchByAdjustCoefficient
 Heuristic to search for feasible solutions by adjusting coefficients so that some items will not be assigned to some bins. More...
 
class  SearchByBinSmoothing
 Heuristic to search for feasible solutions by smoothing dense bins. More...
 
class  SearchByCombinedStrategy
 Heuristic to search for feasible solutions by combined strategies. More...
 
class  SubGradientDescent
 Update lagrangian multiplier with subgradient descent. More...
 
class  Variable
 Describe variables in optimization problem. More...
 
class  VariableProperty
 Describe properties of a variable. More...
 

Enumerations

enum  SolverProperty {
  MIN, MAX, BINARY, INTEGER,
  CONTINUOUS, OPTIMAL, INFEASIBLE, SUBOPTIMAL,
  UNBOUNDED
}
 Some enums used in solver. More...
 

Functions

template<typename T , typename V >
void axpy (unsigned int n, T a, V const *x, T *y)
 \( y = a \cdot x+y \) More...
 
template<typename T , typename V , typename MatrixType >
void AxPlusy (T a, MatrixType const &A, V const *x, T *y)
 \( y = a A x + y \) More...
 
template<typename T , typename V , typename MatrixType >
void ATxPlusy (T a, MatrixType const &A, V const *x, T *y)
 \( y = a A^T x + y \) More...
 
template<typename T >
dot (unsigned int n, T const *x, T const *y)
 compute dot product \( x^T y \) More...
 
template<typename T >
void vcopy (unsigned int n, T const *x, T *y)
 copy vector More...
 
std::string toString (SolverProperty sp)
 Convert limbo::solvers::SolverProperty to std::string. More...
 
template<typename T >
int easy_sdp_ext (int n, int k, struct blockmatrix C, double *a, struct constraintmatrix *constraints, double constant_offset, struct blockmatrix *pX, double **py, struct blockmatrix *pZ, double *ppobj, double *pdobj, struct paramstruc const &params, int const &printlevel)
 API to call Csdp solver. More...
 

Detailed Description

namespace for Limbo.Solvers

namespace for Solvers

namespace Limbo.Solvers

Enumeration Type Documentation

Some enums used in solver.

Enumerator
MIN 

minimize objective

MAX 

maximize objective

BINARY 

binary number

INTEGER 

integer number

CONTINUOUS 

floating point number

OPTIMAL 

optimally solved

INFEASIBLE 

the model is infeasible

SUBOPTIMAL 

the model is suboptimal

UNBOUNDED 

the model is unbounded

Definition at line 29 of file Solvers.h.

Function Documentation

template<typename T , typename V , typename MatrixType >
void limbo::solvers::ATxPlusy ( a,
MatrixType const &  A,
V const *  x,
T *  y 
)
inline

\( y = a A^T x + y \)

Template Parameters
Tdata type of a, y
Vdata type of x
MatrixTypesparse matrix type in CSR format
Parameters
aconstant
Amatrix
xvector
youtput vector

Definition at line 226 of file Numerical.h.

template<typename T , typename V , typename MatrixType >
void limbo::solvers::AxPlusy ( a,
MatrixType const &  A,
V const *  x,
T *  y 
)
inline

\( y = a A x + y \)

Template Parameters
Tdata type of a, y
Vdata type of x
MatrixTypesparse matrix type in CSR format
Parameters
aconstant
Amatrix
xvector
youtput vector

Definition at line 198 of file Numerical.h.

template<typename T , typename V >
void limbo::solvers::axpy ( unsigned int  n,
a,
V const *  x,
T *  y 
)
inline

\( y = a \cdot x+y \)

Template Parameters
Tdata type of a, y
Vdata type of x
Parameters
ndimension
aconstant
xvector
youtput vector

Definition at line 179 of file Numerical.h.

template<typename T >
T limbo::solvers::dot ( unsigned int  n,
T const *  x,
T const *  y 
)
inline

compute dot product \( x^T y \)

Template Parameters
Tdata type
Parameters
ndimension
xvector
yvector
Returns
dot product

Definition at line 252 of file Numerical.h.

template<typename T >
int limbo::solvers::easy_sdp_ext ( int  n,
int  k,
struct blockmatrix  C,
double *  a,
struct constraintmatrix *  constraints,
double  constant_offset,
struct blockmatrix *  pX,
double **  py,
struct blockmatrix *  pZ,
double *  ppobj,
double *  pdobj,
struct paramstruc const &  params,
int const &  printlevel 
)

API to call Csdp solver.

This is a dummy template, so I do not need to write a .c file. See the documentation of Csdp for details on how to describe an SDP problem.

Template Parameters
Tdummy data type, any type works
Parameters
n,k,C,a,constraints,constant_offsetas input problem
pX,py,pZas initial solution and final solution
ppobjas primal objective
pdobjas dual objective
paramspass customized parameters to control the solver
printlevelverbose level in printing
Returns
the return code from sdp

Definition at line 59 of file CsdpEasySdpApi.h.

std::string limbo::solvers::toString ( SolverProperty  sp)
inline

Convert limbo::solvers::SolverProperty to std::string.

Parameters
spsolver property

Definition at line 44 of file Solvers.h.

template<typename T >
void limbo::solvers::vcopy ( unsigned int  n,
T const *  x,
T *  y 
)
inline

copy vector

Template Parameters
Tdata type
Parameters
ndimension
xsource vector
ytarget vector

Definition at line 269 of file Numerical.h.