9template<
typename IndexType,
typename ValueType>
12 typedef std::vector<DistributionEntry<IndexType, ValueType>>
ContainerType;
29 void add(IndexType
const& index, ValueType
const& value);
45 void divide(ValueType
const& value);
57 typename ContainerType::iterator
begin();
58 typename ContainerType::const_iterator
begin()
const;
59 typename ContainerType::iterator
end();
60 typename ContainerType::const_iterator
end()
const;
std::vector< DistributionEntry< IndexType, ValueType > > ContainerType
void clear()
Clears this distribution.
Distribution & operator=(Distribution const &)
ContainerType::iterator begin()
Access to iterators over the entries of the distribution.
void divide(ValueType const &value)
Divides all values in the distribution by the provided value.
void compress()
Compresses the internal storage by summing the values of entries which agree on the index.
ContainerType::iterator end()
void add(DistributionEntry< IndexType, ValueType > const &entry)
Adds the given entry to the distribution.