Interface IDistance<T>

Distance metric implementation & conversions from/to raw distances.

interface IDistance<T> {
    metric: Metric<T>;
    from(x): number;
    to(x): number;
}

Type Parameters

  • T

Implemented by

Properties

Methods

Properties

metric: Metric<T>

The actual distance function metric.

Methods

  • Converts x from the metric of this instance into an Eucledian value.

    Parameters

    • x: number

    Returns number

  • Converts Eucledian distance x into the metric of this instance.

    Parameters

    • x: number

    Returns number

Generated using TypeDoc