ABA_FASTSET Class Reference

class is derived from the class ABA_SET and holds for each set a rank which approximates the logarithm of the tree size representing the set and is also an upper bound for the height of this tree. More...

#include <fastset.h>

Inheritance diagram for ABA_FASTSET:

ABA_SET ABA_ABACUSROOT List of all members.

Public Member Functions

 ABA_FASTSET (ABA_GLOBAL *glob, int size)
bool unionSets (int x, int y)

Private Attributes

ABA_ARRAY< int > rank_

Detailed Description

class is derived from the class ABA_SET and holds for each set a rank which approximates the logarithm of the tree size representing the set and is also an upper bound for the height of this tree.

Parameters:
rank_ The rank of each set.

Definition at line 42 of file fastset.h.


Constructor & Destructor Documentation

ABA_FASTSET::ABA_FASTSET ( ABA_GLOBAL glob,
int  size 
)

The constructor.

At the beginning each possible set receives the rank 0.

Parameters:
glob A pointer to the corresponding global object.
size Only integers between 0 and size-1 can be inserted in the set.


Member Function Documentation

bool ABA_FASTSET::unionSets ( int  x,
int  y 
)

Unites the sets x and y.

It differs from the function unionSets() of the base class ABA_SET such that the tree with smaller rank is attached to the one with larger rank. Therefore, x is no more guaranteed to be the representative of the joint set.

Returns:
true If both sets have been disjoint before the function call,

false otherwise.

Parameters:
x An element of the first set of the union operation.
y An element in the second set of the union operation.

Reimplemented from ABA_SET.


Member Data Documentation

ABA_ARRAY<int> ABA_FASTSET::rank_ [private]

Definition at line 71 of file fastset.h.


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