mvl_hash_vectors: Return hash values for each row

View source: R/RMVL.R

mvl_hash_vectorsR Documentation

Return hash values for each row

Description

This function is passed a list of MVL vectors which are interpreted in data.frame fashion. For each row, i.e. set of vector values with the same index we compute a hash value. Identical rows produce identical hash values. The hash values have good entropy and can be used to map row values into random numbers.

Usage

mvl_hash_vectors(L, indices = NULL)

Arguments

L

list of vector like MVL_OBJECTs

indices

list of indices into objects to sort. If absent or NULL it is assumed to be from 1 to the length of the object.

Value

hash values in numeric format, with 52 valid bits. Each value is uniform between 1 and 2.

See Also

mvl_order_vectors, mvl_find_matches, mvl_group, mvl_find_matches, mvl_indexed_copy, mvl_merge, mvl_write_hash_vectors

Examples

## Not run: 
Mtmp<-mvl_open("tmp_a.mvl", append=TRUE, create=TRUE)
mvl_write_object(Mtmp, runif(100), "vec1")
Mtmp<-mvl_remap(Mtmp)
hash1<-mvl_hash_vectors(list(Mtmp["vec1", ref=TRUE]))

## End(Not run)

RMVL documentation built on Nov. 2, 2023, 6:09 p.m.

Related to mvl_hash_vectors in RMVL...