#include <ExecStreamGenerator.h>
Inheritance diagram for DupRepeatingSeqColumnGenerator:
Public Member Functions | |
DupRepeatingSeqColumnGenerator (int numSequenceInit, int numDupsInit) | |
int64_t | next () |
Private Attributes | |
int | numDups |
int | numSequence |
int64_t | curValue |
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.
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 }
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 }
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().
Definition at line 420 of file ExecStreamGenerator.h.
Referenced by DupRepeatingSeqColumnGenerator(), and next().