Uniform
Repeat the items in vsSource with random order to genereate a series data.
BOOL Uniform(int nSize, vector<string>& vsSource, int i1 = -1)
TRUE for success, else return FALSE.
void datasetobject_uniform_ex1() { Worksheet wks; wks.Create(); // create a empty wks with default template Column col(wks, 0); vector& vec = col.GetDataObject(); vec.SetSize(100); vec = 0; // initialize the vector with 0. DatasetObject dsObj(col); vector<string> vsSource = {"aa", "bb", "cc"}; dsObj.Uniform(10, vsSource, 1); }
DatasetObject::Pattern
origin.h