Skip to content

Limitations on supported metrics / use of Adaptor::accum_dist() / Chebsyhev distance #265

@szhorvat

Description

@szhorvat

I was looking at using the Chebyshev distance ($L_\inf$ metric) with nanoflann, and I'm wondering if this is possible at all. The question that came up:

What is the accum_dist() member function of the metric adaptor supposed to do?

As far as I can tell, it computes a value per single component $x_i$ of a difference vector $\mathbf{x}$. Then the expectation is that that these values should be summed (specifically summed, not accumulated in any other way) to obtain the final distance (or something monotonically related to it).

With a Chebyshev distance, we'd need to take the maximum instead of summing. Do I see it correctly that this is simply not possible with nanoflann?

I am also wondering about that the purpose of the idx parameter of accum_dist() is. This does not seem to be used at all in any of the built-in metrics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions