class provides a very simple implementation of a pool which is sufficient for a large class of applications. pool slots stored in array, set of free slots is managed by a linear list
#include <standardpool.h>
Inheritance diagram for ABA_STANDARDPOOL< BaseType, CoType >::
|
The destructor deletes all slots. The destructor of a pool slot deletes then also the respective constraint or variable.
Scans the pool, removes all deletable items, i.e., those items without having references, and adds the corresponding slots to the list of free slots.
Checks if a pair of a vector and an active constraint/variable set violates any item in the pool. If the pool is a constraint pool, then the vector is an LP-solution and the active set the set of active variables. Otherwise, if the pool is a variable pool, then the vector stores the values of the dual variables and the active set the associated active constraints.
Returns a free slot, or 0 if no free slot is available. A returned slot is removed from the list of free slots.
The output operator calls the output operator of each item of a non-void pool slot.
class provides a very simple implementation of a pool which is sufficient for a large class of applications. pool slots stored in array, set of free slots is managed by a linear list
Definition at line 58 of file standardpool.h.
The constructor for an empty pool.
All slots are inserted in the linked list of free slots.
The destructor deletes all slots. The destructor of a pool slot deletes then also the respective constraint or variable.
Tries to insert a constraint/variable in the pool.
If there is no free slot available, we try to generate free slots by removing redundant items, i.e., items which have no reference to them. If this fails, we either perform an automatic reallocation of the pool or remove non-active items.
A pointer to the pool slot where the item has been inserted, or 0 if the insertion failed.
Implements ABA_POOL< BaseType, CoType >.
Reimplemented in ABA_NONDUPLPOOL< BaseType, CoType >.
Enlarges the pool to store.
To avoid fatal errors we do not allow decreasing the size of the pool.
Reimplemented in ABA_NONDUPLPOOL< BaseType, CoType >.
Scans the pool, removes all deletable items, i.e., those items without having references, and adds the corresponding slots to the list of free slots.
The number of “cleaned” slots.
The maximal number of constraints/variables that can be inserted in the pool.
A pointer to the i-th slot in the pool.
Checks if a pair of a vector and an active constraint/variable set violates any item in the pool. If the pool is a constraint pool, then the vector is an LP-solution and the active set the set of active variables. Otherwise, if the pool is a variable pool, then the vector stores the values of the dual variables and the active set the associated active constraints.
Before a constraint or variable is generated we check if it is valid for the subproblem sub.
The function defines the pure virtual function of the base class ABA_POOL.
This is a very simple version of the pool separation. Future versions might scan a priority queue of the available constraints until a limited number of constraints is tested or separated.
The number of violated items.
Implements ABA_POOL< BaseType, CoType >.
Tries to remove at most maxRemove inactive items from the pool.
A minimum heap of the items with the reference counter as key is built up and items are removed in this order.
Returns a free slot, or 0 if no free slot is available. A returned slot is removed from the list of free slots.
This function defines the pure virtual function of the base class ABA_POOL.
Implements ABA_POOL< BaseType, CoType >.
Inserts the slot in the list of free slots.
It is an error to insert a slot which is not empty.
This function defines the pure virtual function of the base class ABA_POOL.
Implements ABA_POOL< BaseType, CoType >.
The output operator calls the output operator of each item of a non-void pool slot.
A reference to the output stream.
The array with the pool slots.
Definition at line 235 of file standardpool.h.
The linked lists of unused slots.
Definition at line 239 of file standardpool.h.
If the pool becomes full and this member is true, then an automatic reallocation is performed.
Definition at line 245 of file standardpool.h.
The documentation for this class was generated from the following file: