18#include <boost/container/small_vector.hpp>
27 const ArrayView<
const std::pair<size_type, size_type>> &inputs)
31 boost::container::small_vector<std::pair<size_type, size_type>, 128> entries(
32 inputs.begin(), inputs.end());
33 std::sort(entries.begin(), entries.end());
34 boost::container::small_vector<size_type, 128> columns;
36 auto entry = entries.begin();
37 while (entry != entries.end())
39 const auto row = entry->first;
41 while (row_end != entries.end() && row_end->first == row)
45 columns.reserve(row_end - entry);
47 columns.push_back(entry->second);
49 while (entry != row_end)
51 if (columns.back() != entry->second)
52 columns.push_back(entry->second);
ArrayView< typename std::remove_reference< typename std::iterator_traits< Iterator >::reference >::type, MemorySpaceType > make_array_view(const Iterator begin, const Iterator end)
virtual void add_entries(const ArrayView< const std::pair< size_type, size_type > > &entries)
virtual void add_row_entries(const size_type &row, const ArrayView< const size_type > &columns, const bool indices_are_sorted=false)=0
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE