missing

Methods

Method Reference: missing.keyHash

missing: key = keyHash (M)

missing: key = keyHash (M, base)

Generate a hash code for a missing array.

key = keyHash (M) returns a 64-bit hash code of the missing array M as a uint64 scalar. Every element of a missing array is missing, so the code depends on its size alone: two missing arrays of the same size are the same key, and keyMatch reports them so. A missing array is a different key from a missing value of another type, such as NaN or a missing string.

key = keyHash (M, base) also generates a 64-bit hash code using base as the offset basis for the FNV-1a hash algorithm. base must be a uint64 integer type scalar. Use this syntax to cascade keyHash on multiple objects for which a single hash code is required.

Note that unlike MATLAB, this implementation does not use any random seed. As a result, keyHash will always generate the exact same hash key for any particular input across different workers and Octave sessions.

See also: keyHash, keyMatch, dictionary

Source Code: missing