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