30 const ArrayView<
const std::pair<size_type, size_type>> &inputs)
34 boost::container::small_vector<std::pair<size_type, size_type>, 128> entries(
35 inputs.begin(), inputs.end());
36 std::sort(entries.begin(), entries.end());
37 boost::container::small_vector<size_type, 128> columns;
39 auto entry = entries.begin();
40 while (entry != entries.end())
42 const auto row = entry->first;
44 while (row_end != entries.end() && row_end->first == row)
48 columns.reserve(row_end - entry);
50 columns.push_back(entry->second);
52 while (entry != row_end)
54 if (columns.back() != entry->second)
55 columns.push_back(entry->second);