ABA_ACTIVE< BaseType, CoType > Class Template Reference

template class implements the sets of act ive constraints and variables which are associated w ith each subproblem More...

#include <active.h>

Inheritance diagram for ABA_ACTIVE< BaseType, CoType >:

ABA_ABACUSROOT List of all members.

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_MASTERmaster_
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.

Detailed Description

template<class BaseType, class CoType>
class ABA_ACTIVE< BaseType, CoType >

template class implements the sets of act ive constraints and variables which are associated w ith each subproblem

Definition at line 62 of file active.h.


Constructor & Destructor Documentation

template<class BaseType, class CoType>
ABA_ACTIVE< BaseType, CoType >::ABA_ACTIVE ( ABA_MASTER master,
int  max 
)

The constructor.

Parameters:
master A pointer to the corresponding master of the optimization.
max The maximal number of active constraints/variables.

template<class BaseType, class CoType>
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.

Parameters:
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.

template<class BaseType, class CoType>
ABA_ACTIVE< BaseType, CoType >::ABA_ACTIVE ( const ABA_ACTIVE< BaseType, CoType > &  rhs  ) 

The copy constructor.

Parameters:
rhs The active set that is copied.

template<class BaseType, class CoType>
ABA_ACTIVE< BaseType, CoType >::~ABA_ACTIVE (  ) 

The destructor.


Member Function Documentation

template<class BaseType, class CoType>
int ABA_ACTIVE< BaseType, CoType >::number (  )  const

Returns:
The current number of active items.

template<class BaseType, class CoType>
int ABA_ACTIVE< BaseType, CoType >::max (  )  const

Returns:
The maximum number of storable active items (without reallocation).

template<class BaseType, class CoType>
BaseType* ABA_ACTIVE< BaseType, CoType >::operator[] ( int  i  ) 

The operator [].

Returns:
A pointer to the i-th active item or

0 if this item has been removed in the meantime.

Parameters:
i The number of the active item.

template<class BaseType, class CoType>
ABA_POOLSLOTREF<BaseType, CoType>* ABA_ACTIVE< BaseType, CoType >::poolSlotRef ( int  i  ) 

Returns:
The i-th entry in the ABA_ARRAY active.
Parameters:
i The number of the active item.

template<class BaseType, class CoType>
void ABA_ACTIVE< BaseType, CoType >::insert ( ABA_POOLSLOT< BaseType, CoType > *  ps  ) 

Adds a constraint/variable to the active items.

Parameters:
ps The pool slot storing the constraint/variable being added.

template<class BaseType, class CoType>
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.

Parameters:
ps The buffer storing the pool slots of all constraints/variables that are added.

template<class BaseType, class CoType>
void ABA_ACTIVE< BaseType, CoType >::remove ( ABA_BUFFER< int > &  del  ) 

Removes items from the list of active items.

Parameters:
del The numbers of the items that should be removed. These numbers must be upward sorted.

template<class BaseType, class CoType>
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.

Parameters:
newSize The new maximal number of active items.

template<class BaseType, class CoType>
int ABA_ACTIVE< BaseType, CoType >::redundantAge ( int  i  )  const

Returns:
The number of iterations a constraint/variable is already redundant.

template<class BaseType, class CoType>
void ABA_ACTIVE< BaseType, CoType >::incrementRedundantAge ( int  i  ) 

Increments the number of iterations the item i is already redundant by 1.

Parameters:
i The index of the constraint/variable.

template<class BaseType, class CoType>
void ABA_ACTIVE< BaseType, CoType >::resetRedundantAge ( int  i  ) 

the number of iterations item i is redundant to 0.

Parameters:
i The index of the constraint/variable.

template<class BaseType, class CoType>
const ABA_ACTIVE<BaseType, CoType>& ABA_ACTIVE< BaseType, CoType >::operator= ( const ABA_ACTIVE< BaseType, CoType > &  rhs  )  [private]


Friends And Related Function Documentation

template<class BaseType, class CoType>
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.

Returns:
A reference to the output stream.
Parameters:
out The output stream.
rhs The active set being output.


Member Data Documentation

template<class BaseType, class CoType>
ABA_MASTER* ABA_ACTIVE< BaseType, CoType >::master_ [private]

A pointer to corresponding master of the optimization.

Definition at line 256 of file active.h.

template<class BaseType, class CoType>
int ABA_ACTIVE< BaseType, CoType >::n_ [private]

The number of active items.

Definition at line 259 of file active.h.

template<class BaseType, class CoType>
ABA_ARRAY<ABA_POOLSLOTREF<BaseType, CoType> *> ABA_ACTIVE< BaseType, CoType >::active_ [private]

The array storing references to the pool slots of the active items.

Definition at line 263 of file active.h.

template<class BaseType, class CoType>
ABA_ARRAY<int> ABA_ACTIVE< BaseType, CoType >::redundantAge_ [private]

The number of iterations a constraint is already redundant.

Definition at line 267 of file active.h.


The documentation for this class was generated from the following file:
Generated on Tue Aug 14 18:09:56 2007 for ABACUS by  doxygen 1.5.1