cplexlpcompare
Compares two LP files created in cplex format and dumps differences to files.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
Classes | Enumerations | Functions | Variables
lpcompare Namespace Reference

Classes

class  Bound
 Represents a bound of a variable. More...
 
class  Constraint
 Represents a constraint composed of terms, a sign and a right-hand side. More...
 
class  LPModel
 Represents an LP model composed of a bounds, constraints and variables of different kinds. More...
 
class  Term
 Represents a term composed of a coefficient and a variable. More...
 

Enumerations

enum  BoundOp {
  BoundOp::Free = 0, BoundOp::EQ, BoundOp::GT, BoundOp::LT,
  BoundOp::GTE, BoundOp::LTE
}
 
enum  ConstraintOp {
  ConstraintOp::EQ = 0, ConstraintOp::GT, ConstraintOp::LT, ConstraintOp::GTE,
  ConstraintOp::LTE
}
 

Functions

regex re_varname ("[a-zA-Z!\"#$%&\\(\\)/,;?@_`'{}|~][a-zA-Z0-9!\"#$%&\\(\\)/,;?@_`'{}|~.]*")
 
BoundOp invert (BoundOp op)
 Inverts a BoundOp operation. More...
 
BoundOp get_boundop (std::string op)
 Finds a BoundOp representation for the string op. More...
 
std::string get_boundop (BoundOp op)
 Finds a string representation for the BoundOp. More...
 
ConstraintOp get_constraintop (std::string op)
 Finds a ConstraintOp representation for the string op. More...
 
std::string get_constraintop (ConstraintOp op)
 Finds a string representation for the ConstraintOp. More...
 
void custom_split (std::string &s, char const *d, std::vector< std::string > &ret)
 Splits a string into a vector. More...
 
int get_constraintop_val (ConstraintOp op)
 Returns an integer rank representing a ConstraintOp. More...
 

Variables

const char SEPS [] = { ' ' }
 Delimiter for bounds. More...
 
const char SEPS_CONS [] = { ' ', '\t', '\n', '\r' }
 Delimiter for constraints. More...
 

Enumeration Type Documentation

enum lpcompare::BoundOp
strong
Enumerator
Free 
EQ 
GT 
LT 
GTE 
LTE 

Definition at line 43 of file Bound.h.

Enumerator
EQ 
GT 
LT 
GTE 
LTE 

Definition at line 43 of file Constraint.h.

Function Documentation

void lpcompare::custom_split ( std::string &  s,
char const *  d,
std::vector< std::string > &  ret 
)

Splits a string into a vector.

Parameters
sString to split.
dDelimiter array.
retSplitted string.

Definition at line 94 of file Constraint.cpp.

BoundOp lpcompare::get_boundop ( std::string  op)

Finds a BoundOp representation for the string op.

Parameters
opOperation to find BoundOp for.
Returns
A BoundOp representing the operation.

Definition at line 69 of file Bound.cpp.

std::string lpcompare::get_boundop ( BoundOp  op)

Finds a string representation for the BoundOp.

Parameters
opOperation to find string for.
Returns
A string representing the BoundOp.

Definition at line 93 of file Bound.cpp.

ConstraintOp lpcompare::get_constraintop ( std::string  op)

Finds a ConstraintOp representation for the string op.

Parameters
opOperation to find ConstraintOp for.
Returns
A ConstraintOp representing the operation.

Definition at line 51 of file Constraint.cpp.

std::string lpcompare::get_constraintop ( ConstraintOp  op)

Finds a string representation for the ConstraintOp.

Parameters
opOperation to find string for.
Returns
A string representing the ConstraintOp.

Definition at line 72 of file Constraint.cpp.

int lpcompare::get_constraintop_val ( ConstraintOp  op)

Returns an integer rank representing a ConstraintOp.

Equivalent ConstraintOp instances have the same rank.

Parameters
opConstraintOp to find rank of.
Returns
An integer rank.

Definition at line 245 of file Constraint.cpp.

BoundOp lpcompare::invert ( BoundOp  op)

Inverts a BoundOp operation.

Parameters
opOperation to find inverse of.
Returns
A BoundOp representing the inverted operation.

Definition at line 49 of file Bound.cpp.

regex lpcompare::re_varname ( "*"  [a-zA-Z!\"#$%&\\(\\)/,;?@_`'{}|~][a-zA-Z0-9!\"#$%&\\(\\)/,;?@_`'{}|~.])

Variable Documentation

const char lpcompare::SEPS[] = { ' ' }

Delimiter for bounds.

Definition at line 46 of file LPModel.h.

const char lpcompare::SEPS_CONS[] = { ' ', '\t', '\n', '\r' }

Delimiter for constraints.

Definition at line 47 of file LPModel.h.