Class Distance
Static class Distance. Defines a set of extension methods defining distance measures.
Inheritance
Namespace: ISynergy.Framework.Mathematics
Assembly: ISynergy.Framework.Mathematics.dll
Syntax
public static class Distance : object
Methods
View SourceAngular(Double[], Double[])
Gets the Angular distance between two points.
Declaration
public static double Angular(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Angular distance between x and y. |
Examples
For examples, please see Angular documentation page.
View SourceArgMax(Double[], Double[])
Gets the ArgMax distance between two points.
Declaration
public static double ArgMax(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The ArgMax distance between x and y. |
Examples
For examples, please see ArgMax documentation page.
View SourceBrayCurtis(Double[], Double[])
Gets the BrayCurtis distance between two points.
Declaration
public static double BrayCurtis(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The BrayCurtis distance between x and y. |
Examples
For examples, please see BrayCurtis documentation page.
View SourceCanberra(Double[], Double[])
Gets the Canberra distance between two points.
Declaration
public static double Canberra(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Canberra distance between x and y. |
Examples
For examples, please see Canberra documentation page.
View SourceChebyshev(Double[], Double[])
Gets the Chebyshev distance between two points.
Declaration
public static double Chebyshev(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Chebyshev distance between x and y. |
Examples
For examples, please see Chebyshev documentation page.
View SourceCosine(Double[], Double[])
Gets the Cosine distance between two points.
Declaration
public static double Cosine(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Cosine distance between x and y. |
Examples
For examples, please see Cosine documentation page.
View SourceDice(Double[], Double[])
Gets the Dice distance between two points.
Declaration
public static double Dice(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Dice distance between x and y. |
Examples
For examples, please see Dice documentation page.
View SourceDice(Int32[], Int32[])
Gets the Dice distance between two points.
Declaration
public static double Dice(int[] x, int[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | x | The first point |
System.Int32[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Dice distance between x and y. |
Examples
For examples, please see Dice documentation page.
View SourceEuclidean(Sparse<Double>, Sparse<Double>)
Gets the Euclidean distance between two points.
Declaration
public static double Euclidean(Sparse<double> x, Sparse<double> y)
Parameters
Type | Name | Description |
---|---|---|
Sparse<System.Double> | x | The first point |
Sparse<System.Double> | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Euclidean distance between x and y. |
Examples
For examples, please see Euclidean documentation page.
View SourceEuclidean(Double, Double)
Gets the Euclidean distance between two points.
Declaration
public static double Euclidean(double x, double y)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | The first point |
System.Double | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Euclidean distance between x and y. |
Examples
For examples, please see Euclidean documentation page.
View SourceEuclidean(Double, Double, Double, Double)
Gets the Euclidean distance between two points.
Declaration
public static double Euclidean(double vector1x, double vector1y, double vector2x, double vector2y)
Parameters
Type | Name | Description |
---|---|---|
System.Double | vector1x | |
System.Double | vector1y | |
System.Double | vector2x | |
System.Double | vector2y |
Returns
Type | Description |
---|---|
System.Double | The Euclidean distance between x and y. |
Examples
For examples, please see Euclidean documentation page.
View SourceEuclidean(Double[], Double[])
Gets the Euclidean distance between two points.
Declaration
public static double Euclidean(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Euclidean distance between x and y. |
Examples
For examples, please see Euclidean documentation page.
View SourceEuclidean(Tuple<Double, Double>, Tuple<Double, Double>)
Gets the Euclidean distance between two points.
Declaration
public static double Euclidean(Tuple<double, double> x, Tuple<double, double> y)
Parameters
Type | Name | Description |
---|---|---|
Tuple<System.Double, System.Double> | x | The first point |
Tuple<System.Double, System.Double> | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Euclidean distance between x and y. |
Examples
For examples, please see Euclidean documentation page.
View SourceGetDistance<T>(Func<T, T, Double>)
Gets the a IDistance<T> object implementing a particular method of the Distance static class.
Declaration
public static IDistance<T> GetDistance<T>(Func<T, T, double> func)
Parameters
Type | Name | Description |
---|---|---|
Func<T, T, System.Double> | func | The method of Distance. |
Returns
Type | Description |
---|---|
IDistance<T> | An object of the class that implements the given distance. |
Type Parameters
Name | Description |
---|---|
T | The type of the elements being compared in the distance function. |
Remarks
This method is intended to be used in scenarios where you have been using any of the static methods in the Distance class, but now you would like to obtain a reference to an object that implements the same distance you have been using before, but in a object-oriented, polymorphic manner. Please see the example below for more details.
Note: This method relies on reflection and might not work on all scenarios, environments, and/or platforms.
Hamming(BitArray, BitArray)
Gets the Hamming distance between two points.
Declaration
public static double Hamming(BitArray x, BitArray y)
Parameters
Type | Name | Description |
---|---|---|
BitArray | x | The first point |
BitArray | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Hamming distance between x and y. |
Examples
For examples, please see Hamming documentation page.
View SourceHamming(Byte[], Byte[])
Gets the Hamming distance between two points.
Declaration
public static double Hamming(byte[] x, byte[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | x | The first point |
System.Byte[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Hamming distance between x and y. |
Examples
For examples, please see Hamming documentation page.
View SourceHamming(Double[], Double[])
Gets the Hamming distance between two points.
Declaration
public static double Hamming(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Hamming distance between x and y. |
Examples
For examples, please see Hamming documentation page.
View SourceHamming(String, String)
Gets the Hamming distance between two points.
Declaration
public static double Hamming(string x, string y)
Parameters
Type | Name | Description |
---|---|---|
System.String | x | The first point |
System.String | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Hamming distance between x and y. |
Examples
For examples, please see Hamming documentation page.
View SourceHellinger(Double[], Double[])
Gets the Hellinger distance between two points.
Declaration
public static double Hellinger(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Hellinger distance between x and y. |
Examples
For examples, please see Hellinger documentation page.
View SourceIsMetric(Func<Double[], Double[], Double>)
Checks whether a function is a real metric distance, i.e. respects the triangle inequality. Please note that a function can still pass this test and not respect the triangle inequality.
Declaration
public static bool IsMetric(Func<double[], double[], double> value)
Parameters
Type | Name | Description |
---|---|---|
Func<System.Double[], System.Double[], System.Double> | value |
Returns
Type | Description |
---|---|
System.Boolean |
IsMetric(Func<Int32[], Int32[], Double>)
Checks whether a function is a real metric distance, i.e. respects the triangle inequality. Please note that a function can still pass this test and not respect the triangle inequality.
Declaration
public static bool IsMetric(Func<int[], int[], double> value)
Parameters
Type | Name | Description |
---|---|---|
Func<System.Int32[], System.Int32[], System.Double> | value |
Returns
Type | Description |
---|---|
System.Boolean |
IsMetric<T>(IDistance<T>)
Checks whether a function is a real metric distance, i.e. respects the triangle inequality. Please note that a function can still pass this test and not respect the triangle inequality.
Declaration
public static bool IsMetric<T>(IDistance<T> value)
Parameters
Type | Name | Description |
---|---|---|
IDistance<T> | value |
Returns
Type | Description |
---|---|
System.Boolean |
Type Parameters
Name | Description |
---|---|
T |
Jaccard(Double[], Double[])
Gets the Jaccard distance between two points.
Declaration
public static double Jaccard(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Jaccard distance between x and y. |
Examples
For examples, please see Jaccard documentation page.
View SourceKulczynski(Double[], Double[])
Gets the Kulczynski distance between two points.
Declaration
public static double Kulczynski(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Kulczynski distance between x and y. |
Examples
For examples, please see Kulczynski documentation page.
View SourceKulczynski(Int32[], Int32[])
Gets the Kulczynski distance between two points.
Declaration
public static double Kulczynski(int[] x, int[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | x | The first point |
System.Int32[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Kulczynski distance between x and y. |
Examples
For examples, please see Kulczynski documentation page.
View SourceLevenshtein(String, String)
Gets the Levenshtein distance between two points.
Declaration
public static double Levenshtein(string x, string y)
Parameters
Type | Name | Description |
---|---|---|
System.String | x | The first point |
System.String | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Levenshtein distance between x and y. |
Examples
For examples, please see Levenshtein documentation page.
View SourceLevenshtein<T>(T[], T[])
Gets the Levenshtein distance between two points.
Declaration
public static double Levenshtein<T>(T[] x, T[] y)
Parameters
Type | Name | Description |
---|---|---|
T[] | x | |
T[] | y |
Returns
Type | Description |
---|---|
System.Double | The Levenshtein distance between x and y. |
Type Parameters
Name | Description |
---|---|
T |
Mahalanobis(Double[], Double[])
Gets the Mahalanobis distance between two points.
Declaration
public static double Mahalanobis(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Mahalanobis distance between x and y. |
Examples
For examples, please see Mahalanobis documentation page.
View SourceMahalanobis(Double[], Double[], CholeskyDecomposition)
Gets the Mahalanobis distance between two points.
Declaration
public static double Mahalanobis(double[] x, double[] y, CholeskyDecomposition chol)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
CholeskyDecomposition | chol |
Returns
Type | Description |
---|---|
System.Double | The Mahalanobis distance between x and y. |
Examples
For examples, please see Mahalanobis documentation page.
View SourceMahalanobis(Double[], Double[], SingularValueDecomposition)
Gets the Mahalanobis distance between two points.
Declaration
public static double Mahalanobis(double[] x, double[] y, SingularValueDecomposition svd)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
SingularValueDecomposition | svd |
Returns
Type | Description |
---|---|
System.Double | The Mahalanobis distance between x and y. |
Examples
For examples, please see Mahalanobis documentation page.
View SourceMahalanobis(Double[], Double[], Double[,])
Gets the Mahalanobis distance between two points.
Declaration
public static double Mahalanobis(double[] x, double[] y, double[, ] precision)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
System.Double[,] | precision |
Returns
Type | Description |
---|---|
System.Double | The Mahalanobis distance between x and y. |
Examples
For examples, please see Mahalanobis documentation page.
View SourceManhattan(Double[], Double[])
Gets the Manhattan distance between two points.
Declaration
public static double Manhattan(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Manhattan distance between x and y. |
Examples
For examples, please see Manhattan documentation page.
View SourceManhattan(Int32[], Int32[])
Gets the Manhattan distance between two points.
Declaration
public static double Manhattan(int[] x, int[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | x | The first point |
System.Int32[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Manhattan distance between x and y. |
Examples
For examples, please see Manhattan documentation page.
View SourceMatching(Double[], Double[])
Gets the Matching distance between two points.
Declaration
public static double Matching(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Matching distance between x and y. |
Examples
For examples, please see Matching documentation page.
View SourceMatching(Int32[], Int32[])
Gets the Matching distance between two points.
Declaration
public static double Matching(int[] x, int[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | x | The first point |
System.Int32[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Matching distance between x and y. |
Examples
For examples, please see Matching documentation page.
View SourceMinkowski(Double[], Double[])
Gets the Minkowski distance between two points.
Declaration
public static double Minkowski(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Minkowski distance between x and y. |
Examples
For examples, please see Minkowski documentation page.
View SourceMinkowski(Double[], Double[], Double)
Gets the Minkowski distance between two points.
Declaration
public static double Minkowski(double[] x, double[] y, double p)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
System.Double | p |
Returns
Type | Description |
---|---|
System.Double | The Minkowski distance between x and y. |
Examples
For examples, please see Minkowski documentation page.
View SourceMinkowski(Int32[], Int32[])
Gets the Minkowski distance between two points.
Declaration
public static double Minkowski(int[] x, int[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | x | The first point |
System.Int32[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Minkowski distance between x and y. |
Examples
For examples, please see Minkowski documentation page.
View SourceMinkowski(Int32[], Int32[], Double)
Gets the Minkowski distance between two points.
Declaration
public static double Minkowski(int[] x, int[] y, double p)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | x | The first point |
System.Int32[] | y | The second point |
System.Double | p |
Returns
Type | Description |
---|---|
System.Double | The Minkowski distance between x and y. |
Examples
For examples, please see Minkowski documentation page.
View SourceModular(Double, Double)
Gets the Modular distance between two points.
Declaration
public static double Modular(double x, double y)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | The first point |
System.Double | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Modular distance between x and y. |
Examples
For examples, please see Modular documentation page.
View SourceModular(Double, Double, Int32)
Gets the Modular distance between two points.
Declaration
public static double Modular(double x, double y, int modulo)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | The first point |
System.Double | y | The second point |
System.Int32 | modulo |
Returns
Type | Description |
---|---|
System.Double | The Modular distance between x and y. |
Examples
For examples, please see Modular documentation page.
View SourceModular(Int32, Int32)
Gets the Modular distance between two points.
Declaration
public static double Modular(int x, int y)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | The first point |
System.Int32 | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Modular distance between x and y. |
Examples
For examples, please see Modular documentation page.
View SourceModular(Int32, Int32, Int32)
Gets the Modular distance between two points.
Declaration
public static double Modular(int x, int y, int modulo)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | The first point |
System.Int32 | y | The second point |
System.Int32 | modulo |
Returns
Type | Description |
---|---|
System.Double | The Modular distance between x and y. |
Examples
For examples, please see Modular documentation page.
View SourceRogersTanimoto(Double[], Double[])
Gets the RogersTanimoto distance between two points.
Declaration
public static double RogersTanimoto(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The RogersTanimoto distance between x and y. |
Examples
For examples, please see RogersTanimoto documentation page.
View SourceRogersTanimoto(Int32[], Int32[])
Gets the RogersTanimoto distance between two points.
Declaration
public static double RogersTanimoto(int[] x, int[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | x | The first point |
System.Int32[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The RogersTanimoto distance between x and y. |
Examples
For examples, please see RogersTanimoto documentation page.
View SourceRusselRao(Double[], Double[])
Gets the RusselRao distance between two points.
Declaration
public static double RusselRao(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The RusselRao distance between x and y. |
Examples
For examples, please see RusselRao documentation page.
View SourceRusselRao(Int32[], Int32[])
Gets the RusselRao distance between two points.
Declaration
public static double RusselRao(int[] x, int[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | x | The first point |
System.Int32[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The RusselRao distance between x and y. |
Examples
For examples, please see RusselRao documentation page.
View SourceSokalMichener(Double[], Double[])
Gets the SokalMichener distance between two points.
Declaration
public static double SokalMichener(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The SokalMichener distance between x and y. |
Examples
For examples, please see SokalMichener documentation page.
View SourceSokalMichener(Int32[], Int32[])
Gets the SokalMichener distance between two points.
Declaration
public static double SokalMichener(int[] x, int[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | x | The first point |
System.Int32[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The SokalMichener distance between x and y. |
Examples
For examples, please see SokalMichener documentation page.
View SourceSokalSneath(Double[], Double[])
Gets the SokalSneath distance between two points.
Declaration
public static double SokalSneath(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The SokalSneath distance between x and y. |
Examples
For examples, please see SokalSneath documentation page.
View SourceSokalSneath(Int32[], Int32[])
Gets the SokalSneath distance between two points.
Declaration
public static double SokalSneath(int[] x, int[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | x | The first point |
System.Int32[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The SokalSneath distance between x and y. |
Examples
For examples, please see SokalSneath documentation page.
View SourceSquareEuclidean(Sparse<Double>, Sparse<Double>)
Gets the SquareEuclidean distance between two points.
Declaration
public static double SquareEuclidean(Sparse<double> x, Sparse<double> y)
Parameters
Type | Name | Description |
---|---|---|
Sparse<System.Double> | x | The first point |
Sparse<System.Double> | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The SquareEuclidean distance between x and y. |
Examples
For examples, please see SquareEuclidean documentation page.
View SourceSquareEuclidean(Double, Double)
Gets the SquareEuclidean distance between two points.
Declaration
public static double SquareEuclidean(double x, double y)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | The first point |
System.Double | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The SquareEuclidean distance between x and y. |
Examples
For examples, please see SquareEuclidean documentation page.
View SourceSquareEuclidean(Double, Double, Double, Double)
Gets the SquareEuclidean distance between two points.
Declaration
public static double SquareEuclidean(double x1, double y1, double x2, double y2)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x1 | |
System.Double | y1 | |
System.Double | x2 | |
System.Double | y2 |
Returns
Type | Description |
---|---|
System.Double | The SquareEuclidean distance between x and y. |
Examples
For examples, please see SquareEuclidean documentation page.
View SourceSquareEuclidean(Double[], Double[])
Gets the SquareEuclidean distance between two points.
Declaration
public static double SquareEuclidean(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The SquareEuclidean distance between x and y. |
Examples
For examples, please see SquareEuclidean documentation page.
View SourceSquareMahalanobis(Double[], Double[])
Gets the SquareMahalanobis distance between two points.
Declaration
public static double SquareMahalanobis(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The SquareMahalanobis distance between x and y. |
Examples
For examples, please see SquareMahalanobis documentation page.
View SourceSquareMahalanobis(Double[], Double[], CholeskyDecomposition)
Gets the SquareMahalanobis distance between two points.
Declaration
public static double SquareMahalanobis(double[] x, double[] y, CholeskyDecomposition chol)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
CholeskyDecomposition | chol |
Returns
Type | Description |
---|---|
System.Double | The SquareMahalanobis distance between x and y. |
Examples
For examples, please see SquareMahalanobis documentation page.
View SourceSquareMahalanobis(Double[], Double[], SingularValueDecomposition)
Gets the SquareMahalanobis distance between two points.
Declaration
public static double SquareMahalanobis(double[] x, double[] y, SingularValueDecomposition svd)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
SingularValueDecomposition | svd |
Returns
Type | Description |
---|---|
System.Double | The SquareMahalanobis distance between x and y. |
Examples
For examples, please see SquareMahalanobis documentation page.
View SourceSquareMahalanobis(Double[], Double[], Double[,])
Gets the SquareMahalanobis distance between two points.
Declaration
public static double SquareMahalanobis(double[] x, double[] y, double[, ] precision)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
System.Double[,] | precision |
Returns
Type | Description |
---|---|
System.Double | The SquareMahalanobis distance between x and y. |
Examples
For examples, please see SquareMahalanobis documentation page.
View SourceWeightedEuclidean(Double[], Double[])
Gets the WeightedEuclidean distance between two points.
Declaration
public static double WeightedEuclidean(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The WeightedEuclidean distance between x and y. |
Examples
For examples, please see WeightedEuclidean documentation page.
View SourceWeightedEuclidean(Double[], Double[], Double[])
Gets the WeightedEuclidean distance between two points.
Declaration
public static double WeightedEuclidean(double[] x, double[] y, double[] weights)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
System.Double[] | weights |
Returns
Type | Description |
---|---|
System.Double | The WeightedEuclidean distance between x and y. |
Examples
For examples, please see WeightedEuclidean documentation page.
View SourceWeightedEuclidean(Double[], Double[], Int32)
Gets the WeightedEuclidean distance between two points.
Declaration
public static double WeightedEuclidean(double[] x, double[] y, int dimensions)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
System.Int32 | dimensions |
Returns
Type | Description |
---|---|
System.Double | The WeightedEuclidean distance between x and y. |
Examples
For examples, please see WeightedEuclidean documentation page.
View SourceWeightedSquareEuclidean(Double[], Double[])
Gets the WeightedSquareEuclidean distance between two points.
Declaration
public static double WeightedSquareEuclidean(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The WeightedSquareEuclidean distance between x and y. |
Examples
For examples, please see WeightedSquareEuclidean documentation page.
View SourceWeightedSquareEuclidean(Double[], Double[], Double[])
Gets the WeightedSquareEuclidean distance between two points.
Declaration
public static double WeightedSquareEuclidean(double[] x, double[] y, double[] weights)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
System.Double[] | weights |
Returns
Type | Description |
---|---|
System.Double | The WeightedSquareEuclidean distance between x and y. |
Examples
For examples, please see WeightedSquareEuclidean documentation page.
View SourceWeightedSquareEuclidean(Double[], Double[], Int32)
Gets the WeightedSquareEuclidean distance between two points.
Declaration
public static double WeightedSquareEuclidean(double[] x, double[] y, int dimensions)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
System.Int32 | dimensions |
Returns
Type | Description |
---|---|
System.Double | The WeightedSquareEuclidean distance between x and y. |
Examples
For examples, please see WeightedSquareEuclidean documentation page.
View SourceYule(Double[], Double[])
Gets the Yule distance between two points.
Declaration
public static double Yule(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point |
System.Double[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Yule distance between x and y. |
Examples
For examples, please see Yule documentation page.
View SourceYule(Int32[], Int32[])
Gets the Yule distance between two points.
Declaration
public static double Yule(int[] x, int[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | x | The first point |
System.Int32[] | y | The second point |
Returns
Type | Description |
---|---|
System.Double | The Yule distance between x and y. |
Examples
For examples, please see Yule documentation page.