Skip to main content

Module metric

Module metric 

Source
Expand description

How a vector is compared, as the byte the image stores.

The same four values yo_shape::Metric has, written down here because this crate is the format and it does not depend on the shape crate. A collection built for cosine and searched as L2 answers wrongly and quietly, so the metric travels with the image rather than being taken on trust from whatever opened it.

Constants§

COSINE
Cosine similarity, stored as unit vectors.
HAMMING
Hamming distance.
IP
Inner product.
L2
Euclidean distance.

Functions§

is_known
Whether b is a metric this version has a name for.