File HashMultiset.h

↰ Parent directory (ADS/set)

The multiset on a hash table (exercise 8.10): a counter of occurrences per item, which the insertion of a new item sets to 1 and of an item already there increases by 1, and the removal decreases, removing the item at 0.

Definition (ADS/set/HashMultiset.h)

Detailed Description

The contracts [see File Contract.h]: insert() adds one occurrence and remove() takes one away, if any; the invariant is that the size is the sum of the counters, none of which is 0. The operations are defined in HashMultiset.tpp.

  1. Montresor, Algoritmi e Strutture Dati, 2025, exercise 8.10, https://algoritmicamente.it/materiali/libro/capitoli/cap08.pdf

Donato Meoli

Dipartimento di Informatica Universita’ di Pisa

by Donato Meoli

Includes

Namespaces

Classes