Show / Hide Table of Contents

Interface DistanceFunctions

An interface which enables flexible distance functions.

Namespace:KDTree
Assembly:cs.temp.dll.dll
Syntax
public interface DistanceFunctions

Methods

Distance(Double[], Double[])

Compute a distance between two n-dimensional points.

Declaration
double Distance(double[] p1, double[] p2)
Parameters
Type Name Description
System.Double[] p1

The first point.

System.Double[] p2

The second point.

Returns
Type Description
System.Double

The n-dimensional distance.

DistanceToRectangle(Double[], Double[], Double[])

Find the shortest distance from a point to an axis aligned rectangle in n-dimensional space.

Declaration
double DistanceToRectangle(double[] point, double[] min, double[] max)
Parameters
Type Name Description
System.Double[] point

The point of interest.

System.Double[] min

The minimum coordinate of the rectangle.

System.Double[] max

The maximum coorindate of the rectangle.

Returns
Type Description
System.Double

The shortest n-dimensional distance between the point and rectangle.

Back to top © 2017 Mapbox