26 const ArrayView<
const std::pair<size_type, size_type>> &inputs)
30 boost::container::small_vector<std::pair<size_type, size_type>, 128> entries(
31 inputs.begin(), inputs.end());
32 std::sort(entries.begin(), entries.end());
33 boost::container::small_vector<size_type, 128> columns;
35 auto entry = entries.begin();
36 while (entry != entries.end())
38 const auto row = entry->first;
40 while (row_end != entries.end() && row_end->first == row)
44 columns.reserve(row_end - entry);
46 columns.push_back(entry->second);
48 while (entry != row_end)
50 if (columns.back() != entry->second)
51 columns.push_back(entry->second);