Module bliss_audio::distance [−][src]
Expand description
Module containing various distance metric functions.
All of these functions are intended to be used with the custom_distance method, or with playlist_from_songs_custom_distance.
They will yield different styles of playlists, so don’t hesitate to experiment with them if the default (euclidean distance for now) doesn’t suit you.
Traits
Convenience trait for user-defined distance metrics.
Functions
Sort songs
in place by putting songs close to first_song
first
using the distance
metric. Deduplicate identical songs.
Return the cosine distance between two vectors.
Return the euclidean distance between two vectors.
Sort songs
in place using the distance
metric and ordering by
the smallest distance between each song. Deduplicate identical songs.