Interface IDistanceCalculator<T> | Advanced Algorithms
Search Results for

    Show / Hide Table of Contents

    Interface IDistanceCalculator<T>

    A concrete implementation of this interface is required when calling NearestNeigbour() for k-d tree.

    Namespace: Advanced.Algorithms.DataStructures
    Assembly: Advanced.Algorithms.dll
    Syntax
    public interface IDistanceCalculator<T>
        where T : IComparable
    Type Parameters
    Name Description
    T

    Methods

    | Improve this Doc View Source

    Compare(T, T, T[], T[])

    Compare distance between point A to B and the distance between point Start to End.

    Declaration
    int Compare(T a, T b, T[] start, T[] end)
    Parameters
    Type Name Description
    T a
    T b
    T[] start
    T[] end
    Returns
    Type Description
    Int32

    similar result as IComparabl.e

    | Improve this Doc View Source

    Compare(T[], T[], T[])

    Compare the distance between point A to point and point B to point.

    Declaration
    int Compare(T[] a, T[] b, T[] point)
    Parameters
    Type Name Description
    T[] a
    T[] b
    T[] point
    Returns
    Type Description
    Int32

    similar result as IComparable.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX