VectorMetric

How the distance between two vectors is measured (SPEC.md §11). Every metric gives a distance where smaller is closer, so results are always ordered by ascending distance.

Entries

Link copied to clipboard

1 − cos(q, v), from 0 for vectors pointing the same way to 2 for opposite ones; the vectors' lengths don't matter. A zero vector has no direction, so it's rejected under this metric.

Link copied to clipboard

−(q · v): the negated dot product, so that a larger dot product is a smaller distance.

Link copied to clipboard

The Euclidean distance ‖q − v‖.

Companion properties

Link copied to clipboard

Returns an immutable kotlin.enums.EnumEntries list containing the constants of this enum type, in the order they're declared.

Companion functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.

Properties

Link copied to clipboard
Link copied to clipboard