HashSet

Introduction #

A set store.

The HashSet is represented internally as a struct, therefore %HashSet{} can be used whenever there is a need to match on any HashSet. Note though the struct fields are private and must not be accessed directly. Instead, use the functions on this or in the Set module.

The HashSet is implemented using tries, which grows in space as the number of keys grows, working well with both small and large set of keys. For more information about the functions and their APIs, please consult the Set module.

Source

Types #

t

Functions #

delete(set, term)

Callback implementation of Set.delete/2.

difference(set1, set2)

Callback implementation of Set.difference/2.

disjoint?(set1, set2)

Callback implementation of Set.disjoint?/2.

equal?(set1, set2)

Callback implementation of Set.equal?/2.

intersection(set1, set2)

Callback implementation of Set.intersection/2.

member?(hashset, term)

Callback implementation of Set.member?/2.

new()

Specs

Creates a new empty set.

put(hashset, term)

Callback implementation of Set.put/2.

size(hashset)

Callback implementation of Set.size/1.

subset?(set1, set2)

Callback implementation of Set.subset?/2.

to_list(set)

Callback implementation of Set.to_list/1.

union(set1, set2)

Callback implementation of Set.union/2.