The built-ins cover level and shape; anything else – dynamic time warping, a domain-specific dissimilarity, a precomputed matrix – is registered here and then usable by name everywhere in the package.
register_scale_distance(name, fn)
get_scale_distance(name)
list_scale_distances()
clear_scale_distances(names = NULL)Name to register under.
A function of the unit-by-feature matrix returning a stats::dist object (or a square matrix) over its rows.
Distances to remove; NULL clears every registered one.
Built-ins cannot be removed.
Invisibly, name.