forked from andrewkirillov/AForge.NET
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathIDistance.cs
41 lines (39 loc) · 1.35 KB
/
IDistance.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// AForge Math Library
// AForge.NET framework
// http://www.aforgenet.com/framework/
//
// Copyright © AForge.NET, 2007-2010
// contacts@aforgenet.com
//
namespace AForge.Math.Metrics
{
using System;
/// <summary>
/// Interface for distance metric algorithms.
/// </summary>
///
/// <remarks><para>The interface defines a set of methods implemented
/// by distance metric algorithms. These algorithms typically take a set of points and return a
/// distance measure of the x and y coordinates. In this case, the points are represented by two vectors.</para>
///
/// <para>Distance metric algorithms are used in many machine learning algorithms e.g K-nearest neighbor
/// and K-means clustering.</para>
///
/// <para>For additional details about distance metrics, documentation of the
/// particular algorithms should be studied.</para>
/// </remarks>
///
public interface IDistance
{
/// <summary>
/// Returns distance between two N-dimensional double vectors.
/// </summary>
///
/// <param name="p">1st point vector.</param>
/// <param name="q">2nd point vector.</param>
///
/// <returns>Returns distance measurement determined by the given algorithm.</returns>
///
double GetDistance( double[] p, double[] q );
}
}