36 #ifndef SHARK_LABELORDER_H 37 #define SHARK_LABELORDER_H 74 {
return "LabelOrder"; }
87 unsigned int minLabel = std::numeric_limits<unsigned int>::max();
88 unsigned int maxLabel = 0;
91 unsigned int label = dataset.
labels().element(i);
103 unsigned int maxval = std::numeric_limits<unsigned int>::max();
104 std::vector<unsigned int> foundLabels(maxLabel - minLabel + 1, maxval);
107 unsigned int currentPosition = 0;
111 unsigned int label = dataset.
labels().element(i);
112 if(foundLabels[label - minLabel] == maxval)
114 foundLabels[label - minLabel] = currentPosition;
123 unsigned int label = dataset.
labels().element(i);
124 dataset.
labels().element(i) = foundLabels[label - minLabel];
142 unsigned int label = dataset.
labels().element(i);
149 dataset.
labels().element(i) = label;