|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
36 template<
class BaseType,
class CoType>
class PoolSlot;
37 template<
class BaseType,
class CoType>
class PoolSlotRef;
51 template<
class BaseType,
class CoType>
52 class CutBuffer :
public AbacusRoot {
155 void sort(
int threshold);
An array that keeps track of the number of inserted elements; also usable as an efficient stack.
void remove(ArrayBuffer< int > &index)
Removes the elements specified by index from the buffer.
const CutBuffer< BaseType, CoType > & operator=(const CutBuffer< BaseType, CoType > &rhs)
Master * master_
A pointer to the corresponding master of the optimization.
int number() const
Returns the number of buffered items.
PoolSlot< BaseType, CoType > * slot(int i)
Returns a pointer to the i-th PoolSlot that is buffered.
Array< double > rank_
This array stores optionally the rank of the buffered items.
The parameterized class Array implements dynamic arrays of type E.
Array< PoolSlotRef< BaseType, CoType > * > psRef_
References to the pool slots of the buffered constraints/variables.
~CutBuffer()
The destructor.
void extract(int max, ArrayBuffer< PoolSlot< BaseType, CoType > * > &newSlots)
Takes the first max items from the buffer and clears the buffer.
the master of the optimization.
int n_
The number of buffered items.
void sort(int threshold)
Sorts the items according to their ranks.
Stores constraints and variables.
CutBuffer(Master *master, int size)
Creates a cut buffer with capacity size.
bool ranking_
This flag is true if a rank for each buffered item is available.
int size() const
Returns the maximal number of items that can be buffered.
int insert(PoolSlot< BaseType, CoType > *slot, bool keepInPool)
Adds a slot to the buffer.
Array< bool > keepInPool_
If keepInPool_[i] is true for a buffered constraint/variables, then it is not removed from its pool a...
int space() const
Returns the number of items which can still be inserted into the buffer.
The master of the optimization.