Struct capped_multiset::CappedMultiset [] [src]

pub struct CappedMultiset { /* fields omitted */ }

A CappedMultiset structure is a data structure similar to a multiset with the key distinction that it supports setting a cap on the values of each element. Once a cap is set, all operations on the data structure that access an element will return at most the value of the cap.

Methods

impl CappedMultiset
[src]

Consumes a Vec<u32> and returns a CappedMultiset with the same values. By default, no cap is set on the elements of the multiset

Compute the sum of all elements of the multiset, honoring the value of the cap.

Set a cap on the values of the multiset

Trait Implementations

impl Hash for CappedMultiset
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for CappedMultiset
[src]

Formats the value using the given formatter.

impl Eq for CappedMultiset
[src]

impl PartialEq for CappedMultiset
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.