#include <ogdf/lib/abacus/lpsolution.h>
Public Member Functions | |
LpSolution (const LpSolution< BaseType, CoType > &rhs) | |
The copy constructor. | |
LpSolution (Master *master) | |
The constructor. | |
LpSolution (Sub *sub, bool primalVariables, Active< BaseType, CoType > *active) | |
The constructor. | |
~LpSolution () | |
The destructor. | |
Active< BaseType, CoType > * | active () |
Returns the active variables/constraints. | |
int | idLp () const |
Returns the Id of the LP in which the LP solution was generated. | |
int | idSub () const |
Returns the Id of the subproblem in which the LP solution was generated. | |
int | nVarCon () const |
Returns the number of variables (if BaseType is Variable) or the number of constraints (if BaseType is Constraint). | |
double * | zVal () |
Returns the primal/dual variables of the LP solution. | |
const double * | zVal () const |
Returns the primal/dual variables of the LP solution. | |
Public Member Functions inherited from abacus::AbacusRoot | |
virtual | ~AbacusRoot () |
The destructor. | |
Protected Attributes | |
Active< BaseType, CoType > * | active_ |
The active variables/constraints. | |
int | idLp_ |
The Id of the LP in which the LP solution was generated. | |
int | idSub_ |
The Id of the subproblem in which the LP solution was generated. | |
Master * | master_ |
A pointer to the corresponding master of the optimization. | |
int | nVarCon_ |
The number of variables/constraints. | |
Array< double > | zVal_ |
The primal/dual variables of the LP solution. | |
Private Member Functions | |
const LpSolution< BaseType, CoType > & | operator= (const LpSolution< BaseType, CoType > &rhs) |
Friends | |
std::ostream & | operator<< (std::ostream &out, const LpSolution< BaseType, CoType > &rhs) |
The output operator writes the lpsolution to an output stream. | |
class | Separator< CoType, BaseType > |
Additional Inherited Members | |
Static Public Member Functions inherited from abacus::AbacusRoot | |
static bool | ascii2bool (const string &str) |
Converts the string str to a boolean value. | |
static bool | endsWith (const string &str, const string &end) |
Returns true if str ends with end, false otherwise. | |
static double | fracPart (double x) |
Returns the absolute value of the fractional part of x. | |
static const char * | onOff (bool value) |
Converts a boolean variable to the strings "on" and "off". | |
LP solutions.
This template class implements an LP solution. This class is necessary when using the class Separator for separation.
If constraints are to be generated in the separation then the BaseType must be Variable and the CoType must be Constraint. In this case an objects of that class stores the primal variables of a linear program. Otherwise, if variables are to be generated, then BaseType must be Constraint and the CoType must be Variable. In this case an objects of that class stores the dual variables of a linear program.
Definition at line 64 of file lpsolution.h.
abacus::LpSolution< BaseType, CoType >::LpSolution | ( | Sub * | sub, |
bool | primalVariables, | ||
Active< BaseType, CoType > * | active | ||
) |
The constructor.
sub | A pointer to the subproblem in which the LP solution is generated. |
primalVariables | True if LpSolution contains the primal variables. In this case BaseType must be Variable. If primaVariables is false, then BaseType must be Constraint. |
active | The active variables/constraints that are associated with the LP solution. The default argument is 0. Then the set of active variables/constraints is not stored, but is assumed to be fixed and known. |
abacus::LpSolution< BaseType, CoType >::LpSolution | ( | Master * | master | ) |
The constructor.
master | A pointer to Master. |
abacus::LpSolution< BaseType, CoType >::LpSolution | ( | const LpSolution< BaseType, CoType > & | rhs | ) |
The copy constructor.
rhs | The LP solution that is copied. |
abacus::LpSolution< BaseType, CoType >::~LpSolution | ( | ) |
The destructor.
Returns the active variables/constraints.
int abacus::LpSolution< BaseType, CoType >::idSub | ( | ) | const |
Returns the Id of the subproblem in which the LP solution was generated.
int abacus::LpSolution< BaseType, CoType >::nVarCon | ( | ) | const |
Returns the number of variables (if BaseType is Variable) or the number of constraints (if BaseType is Constraint).
|
private |
Returns the primal/dual variables of the LP solution.
const double * abacus::LpSolution< BaseType, CoType >::zVal | ( | ) | const |
Returns the primal/dual variables of the LP solution.
|
friend |
The output operator writes the lpsolution to an output stream.
out | The output stream. |
rhs | The lpsolution being output. |
Definition at line 46 of file lpsolution.h.
The active variables/constraints.
Definition at line 133 of file lpsolution.h.
|
protected |
The Id of the LP in which the LP solution was generated.
Definition at line 130 of file lpsolution.h.
|
protected |
The Id of the subproblem in which the LP solution was generated.
Definition at line 129 of file lpsolution.h.
|
protected |
A pointer to the corresponding master of the optimization.
Definition at line 126 of file lpsolution.h.
|
protected |
The number of variables/constraints.
Definition at line 128 of file lpsolution.h.
|
protected |
The primal/dual variables of the LP solution.
Definition at line 132 of file lpsolution.h.