Biorithm
1.1
|
This class holds all the itemsets at a given level It can keep the items ordered or assume they are being added in order. More...
#include <Rotor.h>
Public Member Functions | |
Rotor (unsigned int digitSize=0, unsigned int valuesSize=0, bool unique=false) | |
Rotor (const Rotor &src) | |
~Rotor () | |
Rotor & | operator= (const Rotor &rhs) |
unsigned int | getValue (unsigned int index) const |
bool | isValid () const |
void | rotate () |
void | setUnique () |
void | reset () |
void | reset (const vector< unsigned int > &startPos) |
void | resizeDigits (unsigned int size) |
void | resizeValues (unsigned int size) |
unsigned int | getSize () const |
unsigned int | getDigit (unsigned int index) const |
bool | isEmpty () const |
This class holds all the itemsets at a given level It can keep the items ordered or assume they are being added in order.
Rotor::Rotor | ( | unsigned int | digitSize = 0 , |
unsigned int | valuesSize = 0 , |
||
bool | unique = false |
||
) |
The constructor
Rotor::Rotor | ( | const Rotor & | src | ) |
The copy constructor
------------------------------- Parameters ------------------------------- const Rotor& src The source itemset level
Rotor::~Rotor | ( | ) |
The destructor
unsigned int Rotor::getDigit | ( | unsigned int | index | ) | const |
Gets a digit
------------------------------ Preconditions ----------------------------- index < digits.size()
------------------------------- Parameters ------------------------------- unsigned int index The index
--------------------------------- Return --------------------------------- The digit at that position
unsigned int Rotor::getSize | ( | ) | const |
Gets the size of the digits
--------------------------------- Return --------------------------------- The size
unsigned int Rotor::getValue | ( | unsigned int | index | ) | const |
Gets a value from the rotor
----------------------------- Preconditions ------------------------------ index < digits.size()
------------------------------- Parameters ------------------------------- unsigned int index The index
--------------------------------- Return --------------------------------- The value at this digit in the rotor
bool Rotor::isEmpty | ( | ) | const |
Sees if there are no digits
--------------------------------- Return --------------------------------- true There are no digits false There are digits
bool Rotor::isValid | ( | ) | const |
Sees if the rotor is valid (we have not gone back to the beginning)
--------------------------------- Return --------------------------------- true The rotor is valid false The rotor is not valid
The = operator
------------------------------- Parameters ------------------------------- const Rotor& rhs The right hand side
--------------------------------- Return --------------------------------- this
void Rotor::reset | ( | ) |
Resets the rotor
void Rotor::reset | ( | const vector< unsigned int > & | startPos | ) |
Resets the rotor starting from a given location
------------------------------- Parameters ------------------------------- const vector<unsigned int>& startPos The starting position
void Rotor::resizeDigits | ( | unsigned int | size | ) |
Resizes the digits
------------------------------- Parameters ------------------------------- unsigned int size The new size
void Rotor::resizeValues | ( | unsigned int | size | ) |
Resizes the values
------------------------------- Parameters ------------------------------- unsigned int size The new size
void Rotor::rotate | ( | ) |
Rotates the rotor one turn
------------------------------ Preconditions ----------------------------- isValid()
void Rotor::setUnique | ( | ) |
Sets uniqueness