Apply transforms to all_labels and get another all_labels
| 135 | |
| 136 | // Apply transforms to all_labels and get another all_labels |
| 137 | inline std::vector<char> TransformLabelsOrder( |
| 138 | const std::vector<char>& all_labels, |
| 139 | const LabelMap& type, |
| 140 | std::vector<LabelType> new_order) { |
| 141 | std::vector<char> ret; |
| 142 | for (auto cnt_type : new_order) { |
| 143 | std::vector<char> tmp; |
| 144 | for (int c : all_labels) { |
| 145 | if (type[c] == cnt_type) tmp.push_back(c); |
| 146 | } |
| 147 | ret.insert(ret.end(), tmp.begin(), tmp.end()); |
| 148 | } |
| 149 | return ret; |
| 150 | } |
| 151 | |
| 152 | inline static void GlobalInfo(const std::vector<std::string>& op_labels, |
| 153 | const std::string& right, |
no test coverage detected