42template<
class BaseType,
class CoType>
class PoolSlot;
43template<
class BaseType,
class CoType>
class PoolSlotRef;
44template<
class BaseType,
class CoType>
class StandardPool;
45template<
class BaseType,
class CoType>
class CutBuffer;
109 bool active()
const {
return (nActive_ != 0); }
113 bool local()
const {
return local_; }
124 virtual bool dynamic()
const {
return dynamic_; }
175 return !(nReferences_ || nLocks_);
193 virtual void print(std::ostream &out)
const;
250 virtual const char *
name()
const;
279 virtual double rank()
const {
return 0; }
365 void removeReference();
379 bool locked()
const {
return (nLocks_ != 0); }
397 Logger::ifout() <<
"ConVar::~ConVar(): constraint/variable still active: \ncounter = " <<
nActive_ <<
"\n";
401 Logger::ifout() <<
"ConVar::~ConVar(): constraint/variable has still " <<
nLocks_ <<
" locks\n";
404#ifndef OGDF_USE_ASSERT_EXCEPTIONS
422 Logger::ifout() <<
"ConVar::removeReference : reference counter negative\n";
Base class of all other classes of ABACUS.
Common base class for constraints (Constraint) and variables (Variable).
const Sub * sub_
A pointer to the subproblem associated with the constraint/variable.
bool expanded_
true, if expanded version of constraint/variables available.
virtual double rank() const
The function should return a rank associated with the constraint/variable.
virtual const char * name() const
Should return the name of the constraint/variable.
bool dynamic_
If this member is true then the constraint/variable can be also removed from the active formulation a...
int nReferences() const
Returns the number of references to the pool slot PoolSlotRef storing this constraint/variable.
virtual void expand() const
Expands a constraint/variable.
void unlock()
Removes one lock from the constraint/variable.
virtual void print(std::ostream &out) const
Writes the constraint/variable to the output stream out.
int nLocks_
The number of locks which have been set on the constraint/variable.
void _compress() const
Removes the expanded format of the constraint/variable.
void addReference()
Indicates that there is a new reference to the pool slot storing this constraint/variable.
void _expand() const
Tries to generate the expanded format of the constraint/variable.
void lock()
Adds an additional lock to the constraint/variable.
const Sub * sub() const
Returns a const pointer to the subproblem associated with the constraint/variable.
virtual bool equal(const ConVar *cv) const
Should compare if the constraint/variable is identical (in a mathematical sense) with the constraint/...
bool global() const
Returns true if the constraint/variable is globally valid, false otherwise.
Master * master_
A pointer to the corresponding master of the optimization.
int nActive_
The number of active subproblems of which the constraint/variable belongs to the set of active constr...
void sub(Sub *sub)
Associates a new subproblem with the constraint/variable.
virtual bool deletable() const
Returns true if the constraint/variable can be destructed.
virtual void compress() const
Compresses a constraint/variable.
ConVar(Master *master, const Sub *sub, bool dynamic, bool local)
Creates an instance of type ConVar.
int nReferences_
The number of references to the pool slot the constraint is stored in.
void removeReference()
Is the counterpart of the function addReference() and indicates the removal of a reference to this co...
bool local() const
Returns true if the constraint/variable is only locally valid, false otherwise.
void deactivate()
Counterpart of activate().
bool active() const
Checks if the constraint/variable is active in at least one active subproblem.
virtual bool dynamic() const
Return true if the constraint/variable is dynamic.
void activate()
Must be called if the constraint/variable is added to the active formulation of an active subproblem.
bool locked() const
Returns true if at least one lock is set on the constraint/variable, false otherwise.
bool expanded() const
Returns true if the expanded format of a constraint/variable is available, false otherwise.
virtual unsigned hashKey() const
Should provide a key for the constraint/variable that can be used to insert it into a hash table.
bool local_
true if the constraint/variable is only locally valid
Forms the virtual base class for all possible constraints given in pool format.
The master of the optimization.
Stores constraints and variables.
Stores a pointer to a pool slot with version number.
Forms the virtual base class for all possible variables given in pool format.
Exception thrown when an algorithm realizes an internal bug that prevents it from continuing.
static std::ostream & ifout()
stream for forced output (global; used by internal libraries, e.g. Abacus)
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
#define OGDF_THROW_PARAM(CLASS, PARAM)
Replacement for throw.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()