#include <ogdf/lib/abacus/lpsolution.h>
Public Member Functions | |
LpSolution (const LpSolution< BaseType, CoType > &rhs) | |
The copy constructor. More... | |
LpSolution (Master *master) | |
The constructor. More... | |
LpSolution (Sub *sub, bool primalVariables, Active< BaseType, CoType > *active) | |
The constructor. More... | |
~LpSolution () | |
The destructor. More... | |
Active< BaseType, CoType > * | active () |
Returns the active variables/constraints. More... | |
int | idLp () const |
Returns the Id of the LP in which the LP solution was generated. More... | |
int | idSub () const |
Returns the Id of the subproblem in which the LP solution was generated. More... | |
int | nVarCon () const |
Returns the number of variables (if BaseType is Variable) or the number of constraints (if BaseType is Constraint). More... | |
double * | zVal () |
Returns the primal/dual variables of the LP solution. More... | |
const double * | zVal () const |
Returns the primal/dual variables of the LP solution. More... | |
Protected Attributes | |
Active< BaseType, CoType > * | active_ |
The active variables/constraints. More... | |
int | idLp_ |
The Id of the LP in which the LP solution was generated. More... | |
int | idSub_ |
The Id of the subproblem in which the LP solution was generated. More... | |
Master * | master_ |
A pointer to the corresponding master of the optimization. More... | |
int | nVarCon_ |
The number of variables/constraints. More... | |
Array< double > | zVal_ |
The primal/dual variables of the LP solution. More... | |
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. More... | |
class | Separator< CoType, BaseType > |
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 43 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.
Active<BaseType, CoType>* abacus::LpSolution< BaseType, CoType >::active | ( | ) |
Returns the active variables/constraints.
int abacus::LpSolution< BaseType, CoType >::idLp | ( | ) | const |
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 |
double* abacus::LpSolution< BaseType, CoType >::zVal | ( | ) |
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. |
|
friend |
Definition at line 66 of file lpsolution.h.
|
protected |
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.