algorithms

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DamerauLevenshtein

func DamerauLevenshtein(a, b string) float64

DamerauLevenshtein computes the Damerau-Levenshtein distance Similar to Levenshtein but also allows transpositions

func Euclidean

func Euclidean(a, b []float64) float64

Euclidean computes the Euclidean distance between two points Returns a similarity score (inverse of distance)

func Hamming

func Hamming(a, b string) float64

Hamming computes the Hamming distance between two strings Strings must be of equal length. Returns a normalized score between 0.0 and 1.0

func HammingBytes

func HammingBytes(a, b []byte) float64

HammingBytes computes the Hamming distance between two byte slices

func Levenshtein

func Levenshtein(a, b string) float64

Levenshtein computes the Levenshtein distance between two strings Returns a normalized score between 0.0 (completely different) and 1.0 (identical)

func Manhattan

func Manhattan(a, b []float64) float64

Manhattan computes the Manhattan distance between two points

Types

This section is empty.

Jump to

Keyboard shortcuts

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