#include <active.h>
Inheritance diagram for ABA_ACTIVE< BaseType, CoType >:
Public Member Functions | |
ABA_ACTIVE (ABA_MASTER *master, int max) | |
ABA_ACTIVE (ABA_MASTER *master, ABA_ACTIVE *a, int max) | |
In addition to the previous constructor, this constructor initializes the active set. | |
ABA_ACTIVE (const ABA_ACTIVE< BaseType, CoType > &rhs) | |
~ABA_ACTIVE () | |
The destructor. | |
int | number () const |
int | max () const |
BaseType * | operator[] (int i) |
ABA_POOLSLOTREF< BaseType, CoType > * | poolSlotRef (int i) |
void | insert (ABA_POOLSLOT< BaseType, CoType > *ps) |
void | insert (ABA_BUFFER< ABA_POOLSLOT< BaseType, CoType > * > &ps) |
Is overloaded that also several items can be added at the same time. | |
void | remove (ABA_BUFFER< int > &del) |
Removes items from the list of active items. | |
void | realloc (int newSize) |
Changes the maximum number of active items which can be stored in an object of this class. | |
int | redundantAge (int i) const |
void | incrementRedundantAge (int i) |
Increments the number of iterations the item i is already redundant by 1. | |
void | resetRedundantAge (int i) |
Private Member Functions | |
const ABA_ACTIVE< BaseType, CoType > & | operator= (const ABA_ACTIVE< BaseType, CoType > &rhs) |
Private Attributes | |
ABA_MASTER * | master_ |
int | n_ |
ABA_ARRAY< ABA_POOLSLOTREF< BaseType, CoType > * > | active_ |
ABA_ARRAY< int > | redundantAge_ |
Friends | |
ostream & | operator<< (ostream &out, const ABA_ACTIVE< BaseType, CoType > &rhs) |
The output operator writes all active constraints and variables to an output stream. If an associated pool slot is void, or the item is newer than the one we refer to, then "void" is output. |
Definition at line 62 of file active.h.
ABA_ACTIVE< BaseType, CoType >::ABA_ACTIVE | ( | ABA_MASTER * | master, | |
int | max | |||
) |
The constructor.
master | A pointer to the corresponding master of the optimization. | |
max | The maximal number of active constraints/variables. |
ABA_ACTIVE< BaseType, CoType >::ABA_ACTIVE | ( | ABA_MASTER * | master, | |
ABA_ACTIVE< BaseType, CoType > * | a, | |||
int | max | |||
) |
In addition to the previous constructor, this constructor initializes the active set.
master | A pointer to the corresponding master of the optimization. | |
a | At most max active constraints/variables are taken from this set. | |
max | The maximal number of active constraints/variables. |
ABA_ACTIVE< BaseType, CoType >::ABA_ACTIVE | ( | const ABA_ACTIVE< BaseType, CoType > & | rhs | ) |
The copy constructor.
rhs | The active set that is copied. |
ABA_ACTIVE< BaseType, CoType >::~ABA_ACTIVE | ( | ) |
The destructor.
int ABA_ACTIVE< BaseType, CoType >::number | ( | ) | const |
int ABA_ACTIVE< BaseType, CoType >::max | ( | ) | const |
BaseType* ABA_ACTIVE< BaseType, CoType >::operator[] | ( | int | i | ) |
The operator [].
0 if this item has been removed in the meantime.
i | The number of the active item. |
ABA_POOLSLOTREF<BaseType, CoType>* ABA_ACTIVE< BaseType, CoType >::poolSlotRef | ( | int | i | ) |
void ABA_ACTIVE< BaseType, CoType >::insert | ( | ABA_POOLSLOT< BaseType, CoType > * | ps | ) |
Adds a constraint/variable to the active items.
ps | The pool slot storing the constraint/variable being added. |
void ABA_ACTIVE< BaseType, CoType >::insert | ( | ABA_BUFFER< ABA_POOLSLOT< BaseType, CoType > * > & | ps | ) |
Is overloaded that also several items can be added at the same time.
ps | The buffer storing the pool slots of all constraints/variables that are added. |
void ABA_ACTIVE< BaseType, CoType >::remove | ( | ABA_BUFFER< int > & | del | ) |
Removes items from the list of active items.
del | The numbers of the items that should be removed. These numbers must be upward sorted. |
void ABA_ACTIVE< BaseType, CoType >::realloc | ( | int | newSize | ) |
Changes the maximum number of active items which can be stored in an object of this class.
newSize | The new maximal number of active items. |
int ABA_ACTIVE< BaseType, CoType >::redundantAge | ( | int | i | ) | const |
void ABA_ACTIVE< BaseType, CoType >::incrementRedundantAge | ( | int | i | ) |
Increments the number of iterations the item i is already redundant by 1.
i | The index of the constraint/variable. |
void ABA_ACTIVE< BaseType, CoType >::resetRedundantAge | ( | int | i | ) |
the number of iterations item i is redundant to 0.
i | The index of the constraint/variable. |
const ABA_ACTIVE<BaseType, CoType>& ABA_ACTIVE< BaseType, CoType >::operator= | ( | const ABA_ACTIVE< BaseType, CoType > & | rhs | ) | [private] |
ostream& operator<< | ( | ostream & | out, | |
const ABA_ACTIVE< BaseType, CoType > & | rhs | |||
) | [friend] |
The output operator writes all active constraints and variables to an output stream. If an associated pool slot is void, or the item is newer than the one we refer to, then "void" is output.
out | The output stream. | |
rhs | The active set being output. |
ABA_MASTER* ABA_ACTIVE< BaseType, CoType >::master_ [private] |
int ABA_ACTIVE< BaseType, CoType >::n_ [private] |
ABA_ARRAY<ABA_POOLSLOTREF<BaseType, CoType> *> ABA_ACTIVE< BaseType, CoType >::active_ [private] |
ABA_ARRAY<int> ABA_ACTIVE< BaseType, CoType >::redundantAge_ [private] |