pub struct Multiset<V: DafnyTypeEq> {
pub data: HashMap<V, DafnyInt>,
pub size: DafnyInt,
}Fields§
§data: HashMap<V, DafnyInt>§size: DafnyIntImplementations§
Source§impl<V: DafnyTypeEq> Multiset<V>
impl<V: DafnyTypeEq> Multiset<V>
pub fn new_empty() -> Multiset<V>
pub fn get_total(map: &HashMap<V, DafnyInt>) -> DafnyInt
pub fn from_hashmap_owned(map: HashMap<V, DafnyInt>) -> Multiset<V>
pub fn from_hashmap(map: &HashMap<V, DafnyInt>) -> Multiset<V>
pub fn from_array(data: &Vec<V>) -> Multiset<V>
pub fn from_iterator<I>(data: I) -> Multiset<V>where
I: Iterator<Item = V>,
pub fn from_set(set: &Set<V>) -> Multiset<V>
pub fn cardinality_usize(&self) -> SizeT
pub fn cardinality(&self) -> DafnyInt
pub fn contains(&self, value: &V) -> bool
pub fn get(&self, value: &V) -> DafnyInt
pub fn update_count(&self, value: &V, new_count: &DafnyInt) -> Multiset<V>
pub fn merge(&self, other: &Multiset<V>) -> Multiset<V>
pub fn intersect(&self, other: &Multiset<V>) -> Multiset<V>
pub fn subtract(&self, other: &Multiset<V>) -> Multiset<V>
pub fn disjoint(&self, other: &Multiset<V>) -> bool
pub fn as_dafny_multiset(&self) -> Multiset<V>
pub fn peek(&self) -> V
pub fn iter_raw(&self) -> Iter<'_, V, DafnyInt>
pub fn iter(&self) -> impl Iterator<Item = V> + '_
Trait Implementations§
Source§impl<V: DafnyTypeEq> DafnyPrint for Multiset<V>
impl<V: DafnyTypeEq> DafnyPrint for Multiset<V>
Source§impl<V> Debug for Multiset<V>where
V: DafnyTypeEq,
impl<V> Debug for Multiset<V>where
V: DafnyTypeEq,
Source§impl<T> Default for Multiset<T>where
T: DafnyTypeEq,
impl<T> Default for Multiset<T>where
T: DafnyTypeEq,
Source§impl<V: DafnyTypeEq> Hash for Multiset<V>
impl<V: DafnyTypeEq> Hash for Multiset<V>
Source§impl<T: DafnyTypeEq> NontrivialDefault for Multiset<T>
impl<T: DafnyTypeEq> NontrivialDefault for Multiset<T>
fn nontrivial_default() -> Self
Source§impl<V: DafnyTypeEq> PartialEq for Multiset<V>
impl<V: DafnyTypeEq> PartialEq for Multiset<V>
Source§impl<V: DafnyTypeEq> PartialOrd for Multiset<V>
impl<V: DafnyTypeEq> PartialOrd for Multiset<V>
impl<V: DafnyTypeEq> Eq for Multiset<V>
Auto Trait Implementations§
impl<V> Freeze for Multiset<V>
impl<V> RefUnwindSafe for Multiset<V>where
V: RefUnwindSafe,
impl<V> !Send for Multiset<V>
impl<V> !Sync for Multiset<V>
impl<V> Unpin for Multiset<V>where
V: Unpin,
impl<V> UnwindSafe for Multiset<V>where
V: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more