|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
42 template<
class BaseType,
class CoType>
class PoolSlot;
43 template<
class BaseType,
class CoType>
class PoolSlotRef;
44 template<
class BaseType,
class CoType>
class StandardPool;
45 template<
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;
228 virtual unsigned hashKey()
const;
250 virtual const char *name()
const;
279 virtual double rank()
const {
return 0; }
321 void _expand()
const;
329 void _compress()
const;
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 // do not throw exceptions in destructor
422 Logger::ifout() <<
"ConVar::removeReference : reference counter negative\n";
bool local() const
Returns true if the constraint/variable is only locally valid, false otherwise.
void addReference()
Indicates that there is a new reference to the pool slot storing this constraint/variable.
Stores a pointer to a pool slot with version number.
const Sub * sub() const
Returns a const pointer to the subproblem associated with the constraint/variable.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
void removeReference()
Is the counterpart of the function addReference() and indicates the removal of a reference to this co...
void unlock()
Removes one lock from the constraint/variable.
void deactivate()
Counterpart of activate().
const Sub * sub_
A pointer to the subproblem associated with the constraint/variable.
bool global() const
Returns true if the constraint/variable is globally valid, false otherwise.
bool locked() const
Returns true if at least one lock is set on the constraint/variable, false otherwise.
int nReferences() const
Returns the number of references to the pool slot PoolSlotRef storing this constraint/variable.
virtual bool deletable() const
Returns true if the constraint/variable can be destructed.
void activate()
Must be called if the constraint/variable is added to the active formulation of an active subproblem.
Exception thrown when an algorithm realizes an internal bug that prevents it from continuing.
Common base class for constraints (Constraint) and variables (Variable).
virtual void compress() const
Compresses a constraint/variable.
virtual bool dynamic() const
Return true if the constraint/variable is dynamic.
Base class of all other classes of ABACUS.
bool active() const
Checks if the constraint/variable is active in at least one active subproblem.
void sub(Sub *sub)
Associates a new subproblem with the constraint/variable.
void lock()
Adds an additional lock to the constraint/variable.
Forms the virtual base class for all possible variables given in pool format.
Master * master_
A pointer to the corresponding master of the optimization.
int nLocks_
The number of locks which have been set on the constraint/variable.
#define OGDF_THROW_PARAM(CLASS, PARAM)
Replacement for throw.
virtual void expand() const
Expands a constraint/variable.
bool local_
true if the constraint/variable is only locally valid
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.
Forms the virtual base class for all possible constraints given in pool format.
Stores constraints and variables.
void print(std::ostream &os, const Array< E, INDEX > &a, char delim=' ')
Prints array a to output stream os using delimiter delim.
ConVar(Master *master, const Sub *sub, bool dynamic, bool local)
Creates an instance of type ConVar.
virtual double rank() const
The function should return a rank associated with the constraint/variable.
int nActive_
The number of active subproblems of which the constraint/variable belongs to the set of active constr...
bool expanded_
true, if expanded version of constraint/variables available.
bool dynamic_
If this member is true then the constraint/variable can be also removed from the active formulation a...
int nReferences_
The number of references to the pool slot the constraint is stored in.
bool expanded() const
Returns true if the expanded format of a constraint/variable is available, false otherwise.
The master of the optimization.