Map
CategoricalData
public
CategoricalMap Map
EX1
void CategoricalData_Map_ex1() { Worksheet wks; wks.Create(); if (wks) { Dataset ds(wks, 0); ds.SetSize(8); vector<string> vs = { "aaa","bbb","ddd","ccc"}; ds.PutStringArray(vs); string strWksColname = wks.Columns(0).GetName(); strWksColname = wks.GetPage().GetName() + "_" + strWksColname; StringArray vMyCatMap; CategoricalData cdMyCatData(strWksColname); vMyCatMap = (StringArray) cdMyCatData.Map; // CategoricalMap is sorted in ascending order by default cdMyCatData.Map.ArrangeZA(); // Sort CategoricalMap in descending order vMyCatMap = (StringArray) cdMyCatData.Map; cdMyCatData.Map.ArrangeAZ(); // Sort CategoricalMap in ascending order vMyCatMap = (StringArray) cdMyCatData.Map; } }
The text value to index map for this CategoricalData data set. See the CategoricalMap class for more details.
origin.h