PermutationGenerator Class Reference

John V.

#include <ExecStreamGenerator.h>

Inheritance diagram for PermutationGenerator:

MockProducerExecStreamGenerator List of all members.

Public Member Functions

 PermutationGenerator (uint nRows)
virtual int64_t generateValue (uint iRow, uint iCol)
 Generates one data value.

Private Attributes

std::vector< int64_tvalues

Detailed Description

John V.


Definition at line 75 of file ExecStreamGenerator.h.

Constructor & Destructor Documentation

PermutationGenerator::PermutationGenerator ( uint  nRows  )  [inline, explicit]

Definition at line 80 of file ExecStreamGenerator.h.

References values.

00081     {
00082         values.resize(nRows);
00083         std::iota(values.begin(), values.end(), 0);
00084         std::random_shuffle(values.begin(), values.end());
00085     }

Member Function Documentation

virtual int64_t PermutationGenerator::generateValue ( uint  iRow,
uint  iCol 
) [inline, virtual]

Generates one data value.

iRow 0-based row number to generate
iCol 0-based col number to generate

Implements MockProducerExecStreamGenerator.

Definition at line 87 of file ExecStreamGenerator.h.

References values.

00088     {
00089         // iCol ignored
00090         return values[iRow];
00091     }

Member Data Documentation

std::vector<int64_t> PermutationGenerator::values [private]

Definition at line 77 of file ExecStreamGenerator.h.

Referenced by generateValue(), and PermutationGenerator().

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