HashSetJS
|
Private Member Functions | |
constructor (hash_func='sha512_str') | |
get | size () |
equals (other) | |
add (x) | |
delete (x) | |
has (x) | |
dump (fn=null) | |
Static Private Member Functions | |
static | load (fn) |
Hash Set class (only stores hash values, not actual elements)
|
private |
Insert an element into this Hash Set.
{Object} | x - The element to insert. |
|
private |
Initialize a new Hash Set. @constructor
{String} | hash_func - The hash function to use in this Hash Set. |
|
private |
Remove an element from this Hash Set.
{object} | x - The element to remove. |
|
private |
Dump this Hash Set into a Buffer
of bytes, and optionally write it to a file.
{String} | fn - The name of the file into which this Hash Set should be dumped, or null to not write to a file. |
|
private |
Return true
if this Hash Set is equivalent to the other, otherwise return false
.
{Object} | other - The other Hash Set against which to compare this one. |
true
if this
is equivalent to other
, otherwise false
.
|
private |
Find an element in this Hash Set.
{Object} | x - The element to find. |
|
staticprivate |
Load a Hash Set from a given file or Buffer
.
{String} | fn - The name of the file from which to load a Hash Set, or the Buffer containing the file's contents. |
|
private |
Return the total number of elements in this Hash Set (hash collisions will be treated as a single element).