Skip to content

Accept <:Metric #1

@Datseris

Description

@Datseris

Instead of forcing all users of VPTrees to change a metric to a function, perhaps it is much easier to use multiple dispatch in this package only once, to allow both Function as well as Metric to be the input to VPTree. For example you can internally define get_distance or so like this:

get_distance(m::Metric, a, b) = evaluate(m, a, b)
get_distance(f::Function, a, b) = f(a, b)

This happens only once on the developers end, instead of an unlimited amount of times on the user end.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions