 |
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
38 #pragma GCC visibility push(default)
50 template<
class BaseType,
class CoType>
class Active;
88 :
ConVar(master, sub, dynamic, local),
89 fsVarStat_(master), obj_(obj), lBound_(lBound), uBound_(uBound), type_(
type)
105 bool binary()
const {
return type_.binary(); }
109 bool integer()
const {
return type_.integer(); }
113 virtual double obj()
const {
return obj_; }
117 double uBound()
const {
return uBound_; }
124 void uBound(
double newBound) { uBound_ = newBound; }
128 double lBound()
const {
return lBound_; }
135 void lBound(
double newBound) { lBound_ = newBound; }
165 virtual bool valid(
const Sub *sub)
const;
190 return con->
coeff(
this);
203 virtual bool violated(
double rc)
const;
219 double *y,
double *slack =
nullptr)
const;
259 void printCol(std::ostream &out,
281 #pragma GCC visibility pop
Implements the sets of active constraints and variables which are associated with each subproblem.
VarType::TYPE varType() const
Returns the type of the variable.
Variable(Master *master, const Sub *sub, bool dynamic, bool local, double obj, double lBound, double uBound, VarType::TYPE type)
Initializes a variable.
const Sub * sub() const
Returns a const pointer to the subproblem associated with the constraint/variable.
bool integer() const
Returns true If the type of the variable is Integer, false otherwise.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
status of fixed and set variables.
constraints and variables.
bool discrete() const
Returns true if the type of the variable is Integer or Binary, false otherwise.
virtual double obj() const
Returns the objective function coefficient.
Status of fixed and set variables.
VarType type_
The type of the variable.
double lBound() const
Returns the lower bound of the variable.
const Sub * sub_
A pointer to the subproblem associated with the constraint/variable.
FSVarStat fsVarStat_
The global status of fixing and setting of the variable.
Common base class for constraints (Constraint) and variables (Variable).
virtual bool valid(const Sub *sub) const
Returns true if the variable is valid, false otherwise.
double obj_
The objective function coefficient of the variable.
Forms the virtual base class for all possible variables given in pool format.
bool binary() const
Returns true If the type of the variable is Binary, false otherwise.
virtual double coeff(const Constraint *con) const
Computes the coefficient of the variable in the constraint con.
Representation of variables in column format.
bool local_
true if the constraint/variable is only locally valid
virtual double coeff(const Variable *v) const =0
Returns the coefficient of the variable v in the constraint.
the master of the optimization.
double lBound_
The lower bound of the variable.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Forms the virtual base class for all possible constraints given in pool format.
void lBound(double newBound)
Sets the lower bound of the variable to newBound.
double uBound_
The upper bound of the variable.
TYPE
The enumeration with the different variable types.
void uBound(double newBound)
Sets the upper bound of the variable to newBound.
bool ancestor(const Sub *sub) const
Returns true if this subproblem is an ancestor of the subproblem sub, false otherwise.
const FSVarStat * fsVarStat() const
The master of the optimization.
double uBound() const
Returns the upper bound of the variable.