Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JaccardSimilarity ¶
func JaccardSimilarity[T constraints.Ordered](a, b []T) float64
JaccardSimilarity calculates the Jaccard similarity by sorting the input slices, deduplicating them, and then using a two-pointer approach to find the intersection. This function uses generics to handle any comparable type.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.