39template<
class BaseType,
class CoType>
class PoolSlot;
40template<
class BaseType,
class CoType>
class PoolSlotRef;
42template<
class BaseType,
class CoType>
45template<
class BaseType,
class CoType>
61template <
class BaseType,
class CoType>
122 Logger::ifout() <<
"Active::operator[] : no active item in slot " << i <<
".\n";
138 Logger::ifout() <<
"Active::operator[] : no active item in slot " << i <<
".\n";
Base class of all other classes of ABACUS.
Implements the sets of active constraints and variables which are associated with each subproblem.
void resetRedundantAge(int i)
Sets the number of iterations item i is redundant to 0.
void insert(PoolSlot< BaseType, CoType > *ps)
Adds a constraint/variable to the active items set.
Master * master_
A pointer to corresponding master of the optimization.
int n_
The number of active items.
int number() const
Returns the current number of active items.
Array< int > redundantAge_
The number of iterations a constraint is already redundant.
int max() const
Returns the maximum number of storable active items (without reallocation).
const Active< BaseType, CoType > & operator=(const Active< BaseType, CoType > &rhs)
Active(Master *master, Active *a, int max)
Creates a set of active items, initialized to at most max items from a.
int redundantAge(int i) const
Returns the number of iterations a constraint/variable is already redundant.
const PoolSlotRef< BaseType, CoType > * poolSlotRef(int i) const
Returns the i-th entry in the Array active.
void incrementRedundantAge(int i)
Increments the number ofiterations the item i is already redundant by 1.
void remove(ArrayBuffer< int > &del)
Removes items from the list of active items.
Active(const Active< BaseType, CoType > &rhs)
Copy constructor.
void realloc(int newSize)
Changes the maximum number of active items which can be stored.
Array< PoolSlotRef< BaseType, CoType > * > active_
The array storing references to the pool slots of the active items.
const BaseType * operator[](int i) const
Access to the i-th active item.
BaseType * operator[](int i)
Access to the i-th active item.
Active(Master *master, int max)
Creates an empty set of active items.
void insert(ArrayBuffer< PoolSlot< BaseType, CoType > * > &ps)
Adds constraints/variables to the active items set.
PoolSlotRef< BaseType, CoType > * poolSlotRef(int i)
Returns the i-th entry in the Array active.
The master of the optimization.
Stores constraints and variables.
Stores a pointer to a pool slot with version number.
Exception thrown when an algorithm realizes an internal bug that prevents it from continuing.
An array that keeps track of the number of inserted elements; also usable as an efficient stack.
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_NEW_DELETE
Makes the class use OGDF's memory allocator.
#define OGDF_THROW_PARAM(CLASS, PARAM)
Replacement for throw.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
std::ostream & operator<<(std::ostream &out, const Active< BaseType, CoType > &rhs)