clustering_metrics.ext module¶
-
class
clustering_metrics.ext.
PHashCombiner
¶ Bases:
object
Use polynomial hashing to reduce a vector of hashes
-
combine
()¶ Combine a list of integer hashes
-
-
class
clustering_metrics.ext.
VarlenHash
¶ Bases:
object
Create a hash function of arbitrary output length
-
clustering_metrics.ext.
hash_builtin_128
()¶ A better hash function based on Python’s built-in hash()
Note: vanilla hash() is a terrible hash function.
-
clustering_metrics.ext.
hash_builtin_64
()¶ A better hash function based on Python’s built-in hash()
Note: the built-in hash() is a terrible hash function. For some examples, see http://michaelnielsen.org/blog/consistent-hashing/
-
clustering_metrics.ext.
hash_combine_boost
()¶ Hash two 64-bit integers together Uses boost::hash_combine algorithm
-
clustering_metrics.ext.
hash_combine_boost_64
()¶ Hash two 64-bit integers together Uses boost::hash_combine algorithm
-
clustering_metrics.ext.
hash_combine_murmur
()¶ Hash two 64-bit integers together Uses a Murmur-inspired hash function
-
clustering_metrics.ext.
hash_combine_murmur_64
()¶ Hash two 64-bit integers together Uses a Murmur-inspired hash function
-
clustering_metrics.ext.
hash_md5_128
()¶ Return value is 128 bits
-
clustering_metrics.ext.
hash_md5_64
()¶ Return value is 128 bits
-
clustering_metrics.ext.
hashable
()¶
-
clustering_metrics.ext.
long2int
()¶ Lossily map a long type to the range of int
Parameters: num (long) – input long variable Returns: input mapped to int range Return type: int