mash

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 1, 2026 License: MIT Imports: 5 Imported by: 1

Documentation

Overview

Package mash provides sequence MinHashing and Mash distance calculation.

Index

Constants

This section is empty.

Variables

View Source
var Seed uint32 = 0

Seed is the hash seed. Affects subsequent calls to Sequences and Add.

Functions

func Add

func Add(mh *minhash.MinHash[uint64], k int, seqs ...[]byte)

Add adds the given sequences to an existing MinHash using subsequences of length k. Equivalent to calling Sequences on the old and new sequences together.

func Distance

func Distance(mh1, mh2 *minhash.MinHash[uint64], k int) float64

Distance returns the Mash distance between two MinHash collections.

func FromJaccard

func FromJaccard(jac float64, k int) float64

FromJaccard returns the Mash distance given a Jaccard similarity.

func Sequences

func Sequences(n, k int, seqs ...[]byte) *minhash.MinHash[uint64]

Sequences returns a single MinHash for seqs with n elements and for subsequences of length k.

Types

This section is empty.

Directories

Path Synopsis
Package mash provides sequence MinHashing and Mash distance calculation.
Package mash provides sequence MinHashing and Mash distance calculation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL