36template<
class BaseType,
class CoType>
44 if (slot ==
nullptr) {
47 hash_.insert(
cv->hashKey(), slot);
57template<
class BaseType,
class CoType>
61 int key =
cv->hashKey();
65 if (
cv->equal((*cand)->conVar())) {
68 cand = hash_.next(key);
73template<
class BaseType,
class CoType>
77 int key =
cv->hashKey();
81 if (
cv->equal((*cand)->conVar())) {
84 cand = hash_.next(key);
89template<
class BaseType,
class CoType>
92 int key = slot->conVar()->hashKey();
95 if (hash_.remove(key, slot)) {
98 Logger::ifout() <<
"NonDuplPool::softDeleteCon(): slot not found in hash table.\n";
108template<
class BaseType,
class CoType>
112 if (hash_.remove(slot->conVar()->hashKey(), slot)) {
115 Logger::ifout() <<
"NonDuplPool::hardDeleteConVar(): constraint not found in hash table.\n";
virtual int softDeleteConVar(PoolSlot< BaseType, CoType > *slot)
Has to be redefined because the slot has to be removed from the hash table if the constraint/variable...
virtual PoolSlot< BaseType, CoType > * present(BaseType *cv)
Checks if constraint/variables cv is already contained in the pool.
virtual PoolSlot< BaseType, CoType > * insert(BaseType *cv)
Insert constraint/variable cv in the pool.
virtual void hardDeleteConVar(PoolSlot< BaseType, CoType > *slot)
Has to be redefined because the pool slot has to be removed from the hash table.
virtual void hardDeleteConVar(PoolSlot< BaseType, CoType > *slot)
Removes a constraint/variable from the pool and adds the slot to the set of free slots.
virtual int softDeleteConVar(PoolSlot< BaseType, CoType > *slot)
Removes the constraint/variable stored in slot from the pool if it can be deleted.
virtual PoolSlot< BaseType, CoType > * insert(BaseType *cv)
Tries to insert a constraint/variable in the pool.
static std::ostream & ifout()
stream for forced output (global; used by internal libraries, e.g. Abacus)
#define OGDF_THROW_PARAM(CLASS, PARAM)
Replacement for throw.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
standard pool without constraint duplication.