The functions for general generation of Micro
◆ genIncrementalAlphabet()
template<class dType = uint32_t>
vector<dType> INTELLI::MicroDataSet::genIncrementalAlphabet |
( |
size_t |
len | ) |
|
|
inline |
To generate incremental alphabet, starting from 0 and end at len.
- Template Parameters
-
dType | The data type in the alphabet, default uint32_t |
- Parameters
-
len | The length of alphabet |
- Returns
- The output vector alphabet
◆ genRandInt()
template<class tsType = uint32_t, class genType = std::mt19937>
vector<tsType> INTELLI::MicroDataSet::genRandInt |
( |
size_t |
len, |
|
|
tsType |
maxV, |
|
|
tsType |
minV = 0 |
|
) |
| |
|
inline |
generate the vector of random integer
- Template Parameters
-
tsType | The data type, default uint32_t |
genType | The generator type, default mt19937 (32 bit rand) |
- Parameters
-
len | The length of output vector |
maxV | The maximum value of output |
minV | The minimum value of output |
- Returns
- The output vector
- Note
- Both signed and unsigned int are support, just make sure you have right tsType
-
Other options for genType:
- mt19937_64: 64 bit rand
- ranlux24: 24 bit
- ranlux48: 48 bit
◆ genZipfInt()
template<class tsType = size_t>
vector<tsType> INTELLI::MicroDataSet::genZipfInt |
( |
size_t |
len, |
|
|
tsType |
maxV, |
|
|
double |
fac |
|
) |
| |
|
inline |
The function to generate a vector of integers which has zipf distribution.
- Parameters
-
tsType | The data type of int, default is size_t |
len | The length of output vector |
maxV | The maximum value of integer |
fac | The zipf factor, in [0,1] |
- Returns
- the output vector
◆ genZipfLut()
template<class dType = double>
vector<dType> INTELLI::MicroDataSet::genZipfLut |
( |
size_t |
len, |
|
|
dType |
fac |
|
) |
| |
|
inline |
To generate the zipf Lut.
- Template Parameters
-
dType | The data type in the alphabet, default double |
- Parameters
-
len | The length of alphabet |
fac | The zipf factor, in [0,1] |
- Returns
- The output vector lut