Cuckoo v1.0.1 Cuckoo.Bucket
This module implements a Bucket.
Summary
Functions
Returns true
if the bucket contains the element
, otherwise returns false
Tries to find the given element
in the bucket
Returns the element at the specified index
Checks if the bucket
has any room left
Creates a new bucket with the given size n
Resets the entry index
to the default value
Sets the entry index
to element
Types
Functions
Returns true
if the bucket contains the element
, otherwise returns false
.
Tries to find the given element
in the bucket
.
Returns {:ok, index}
if it finds it, otherwise returns {:error, :inexistent}
.
Returns the element at the specified index
.
Checks if the bucket
has any room left.
Returns { :ok, index }
if it finds an empty entry in the bucket,
otherwise returns { :error, :full }
.
Creates a new bucket with the given size n
.
Resets the entry index
to the default value.
Returns the updated bucket.