35#pragma GCC visibility push(default)
39template<
class BaseType,
class CoType>
42template<
class BaseType,
class CoType>
57template<
class BaseType,
class CoType>
89 friend std::ostream& operator<< <> (std::ostream &out,
const StandardPool &rhs);
163 double minAbsViolation = 0.001,
192 if (
slot->conVar()) {
193 Logger::ifout() <<
"StandardPool::putSlot(): you cannot put a non-void slot.\n";
216#pragma GCC visibility pop
Declaration of singly linked lists and iterators.
Implements the sets of active constraints and variables which are associated with each subproblem.
The master of the optimization.
Base class for constraint/variabe pools.
Stores constraints and variables.
Array< PoolSlot< BaseType, CoType > * > pool_
The array with the pool slots.
virtual void putSlot(PoolSlot< BaseType, CoType > *slot)
Inserts the slot in the list of free slots.
virtual int separate(double *x, Active< CoType, BaseType > *active, Sub *sub, CutBuffer< BaseType, CoType > *cutBuffer, double minAbsViolation=0.001, int ranking=0)
Checks if a pair of a vector and an active constraint/variable set violates any item in the pool.
const StandardPool & operator=(const StandardPool &rhs)
int size() const
Return the maximal number of constraints/variables that can be inserted in the pool.
bool autoRealloc_
If the pool becomes full and this member is true, then an automatic reallocation is performed.
StandardPool(const StandardPool &rhs)
virtual void increase(int size)
Enlarges the pool to store up to size items.
virtual ~StandardPool()
The destructor.
virtual PoolSlot< BaseType, CoType > * insert(BaseType *cv)
Tries to insert a constraint/variable in the pool.
PoolSlot< BaseType, CoType > * slot(int i)
Returns a pointer to the i-th slot in the pool.
ogdf::SListPure< PoolSlot< BaseType, CoType > * > freeSlots_
The linked lists of unused slots.
virtual PoolSlot< BaseType, CoType > * getSlot()
Returns a free slot, or 0 if no free slot is available.
StandardPool(Master *master, int size, bool autoRealloc=false)
Creates an empty pool.
int removeNonActive(int maxRemove)
Tries to remove at most maxRemove inactive items from the pool.
int cleanup()
Cleans-up the pool.
Exception thrown when an algorithm realizes an internal bug that prevents it from continuing.
The parameterized class Array implements dynamic arrays of type E.
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.
std::ostream & operator<<(std::ostream &out, const Active< BaseType, CoType > &rhs)