DupRepeatingSeqColumnGenerator Class Reference

A duplicating repeating column sequence generator. More...

#include <ExecStreamGenerator.h>

Inheritance diagram for DupRepeatingSeqColumnGenerator:

ColumnGenerator< T > List of all members.

Public Member Functions

 DupRepeatingSeqColumnGenerator (int numSequenceInit, int numDupsInit)
int64_t next ()

Private Attributes

int numDups
int numSequence
int64_t curValue

Detailed Description

A duplicating repeating column sequence generator.

Generates column values in a repeating sequence. Values are duplicated for each sequence value, and repeat after nSequence values. E.g., 0, 0, 0, ..., 1, 1, 1, ... 2, 2, 2, ..., n-1, n-1, n-1, ..., 0, 0, 0, ...

Definition at line 416 of file ExecStreamGenerator.h.


Constructor & Destructor Documentation

DupRepeatingSeqColumnGenerator::DupRepeatingSeqColumnGenerator ( int  numSequenceInit,
int  numDupsInit 
) [inline, explicit]

Definition at line 423 of file ExecStreamGenerator.h.

References curValue, numDups, and numSequence.

00426     {
00427         assert(numSequenceInit > 0);
00428         assert(numDupsInit > 0);
00429         numSequence = numSequenceInit;
00430         numDups = numDupsInit;
00431         curValue = 0;
00432     }


Member Function Documentation

int64_t DupRepeatingSeqColumnGenerator::next (  )  [inline, virtual]

Implements ColumnGenerator< T >.

Definition at line 434 of file ExecStreamGenerator.h.

References curValue, numDups, and numSequence.

00435     {
00436         return (curValue++ % (numDups * numSequence)) / numDups;
00437     }


Member Data Documentation

int DupRepeatingSeqColumnGenerator::numDups [private]

Definition at line 418 of file ExecStreamGenerator.h.

Referenced by DupRepeatingSeqColumnGenerator(), and next().

int DupRepeatingSeqColumnGenerator::numSequence [private]

Definition at line 419 of file ExecStreamGenerator.h.

Referenced by DupRepeatingSeqColumnGenerator(), and next().

int64_t DupRepeatingSeqColumnGenerator::curValue [private]

Definition at line 420 of file ExecStreamGenerator.h.

Referenced by DupRepeatingSeqColumnGenerator(), and next().


The documentation for this class was generated from the following file:
Generated on Mon Jun 22 04:00:30 2009 for Fennel by  doxygen 1.5.1