Generated by DocFX

Struct Euclidean

Euclidean distance metric.

Implements
IMetric<System.Double>
IDistance<System.Double>
IDistance<System.Double, System.Double>
ISimilarity<System.Double>
ISimilarity<System.Double, System.Double>
IMetric<System.Double[]>
IDistance<System.Double[]>
IDistance<System.Double[], System.Double[]>
ISimilarity<System.Double[]>
ISimilarity<System.Double[], System.Double[]>
IMetric<Tuple<System.Double, System.Double>>
IDistance<Tuple<System.Double, System.Double>>
IDistance<Tuple<System.Double, System.Double>, Tuple<System.Double, System.Double>>
ISimilarity<Tuple<System.Double, System.Double>>
ISimilarity<Tuple<System.Double, System.Double>, Tuple<System.Double, System.Double>>
IDistance<Sparse<System.Double>>
IDistance<Sparse<System.Double>, Sparse<System.Double>>
ISimilarity<Sparse<System.Double>>
ISimilarity<Sparse<System.Double>, Sparse<System.Double>>
ICloneable
Namespace: ISynergy.Framework.Mathematics.Distances
Assembly: ISynergy.Framework.Mathematics.dll
Syntax
public struct Euclidean : IMetric<double>, IDistance<double>, IDistance<double, double>, ISimilarity<double>, ISimilarity<double, double>, IMetric<double[]>, IDistance<double[]>, IDistance<double[], double[]>, ISimilarity<double[]>, ISimilarity<double[], double[]>, IMetric<Tuple<double, double>>, IDistance<Tuple<double, double>>, IDistance<Tuple<double, double>, Tuple<double, double>>, ISimilarity<Tuple<double, double>>, ISimilarity<Tuple<double, double>, Tuple<double, double>>, IDistance<Sparse<double>>, IDistance<Sparse<double>, Sparse<double>>, ISimilarity<Sparse<double>>, ISimilarity<Sparse<double>, Sparse<double>>

Methods

View Source

Clone()

Creates a new object that is a copy of the current instance.

Declaration
public object Clone()
Returns
Type Description
System.Object

A new object that is a copy of this instance.

View Source

Distance(Sparse<Double>, Sparse<Double>)

Computes the distance d(x,y) between points x and y.

Declaration
public double Distance(Sparse<double> x, Sparse<double> y)
Parameters
Type Name Description
Sparse<System.Double> x

The first point x.

Sparse<System.Double> y

The second point y.

Returns
Type Description
System.Double

A double-precision value representing the distance d(x,y) between x and y according to the distance function implemented by this class.

View Source

Distance(Double, Double)

Computes the distance d(x,y) between points x and y.

Declaration
public double Distance(double x, double y)
Parameters
Type Name Description
System.Double x

The first point x.

System.Double y

The second point y.

Returns
Type Description
System.Double

A double-precision value representing the distance d(x,y) between x and y according to the distance function implemented by this class.

View Source

Distance(Double, Double, Double, Double)

Gets the Euclidean distance between two points. Note: this function is dangerous as it is too easy to invert its arguments by mistake. Please consider using the Tuple<double, double> overload instead.

Declaration
public double Distance(double vector1x, double vector1y, double vector2x, double vector2y)
Parameters
Type Name Description
System.Double vector1x

The first coordinate of first point in space.

System.Double vector1y

The second coordinate of first point in space.

System.Double vector2x

The first coordinate of second point in space.

System.Double vector2y

The second coordinate of second point in space.

Returns
Type Description
System.Double

The Euclidean distance between x and y.

View Source

Distance(Double[], Double[])

Computes the distance d(x,y) between points x and y.

Declaration
public double Distance(double[] x, double[] y)
Parameters
Type Name Description
System.Double[] x

The first point x.

System.Double[] y

The second point y.

Returns
Type Description
System.Double

A double-precision value representing the distance d(x,y) between x and y according to the distance function implemented by this class.

View Source

Distance(Tuple<Double, Double>, Tuple<Double, Double>)

Gets the Euclidean distance between two points.

Declaration
public double Distance(Tuple<double, double> x, Tuple<double, double> y)
Parameters
Type Name Description
Tuple<System.Double, System.Double> x

The first point in space.

Tuple<System.Double, System.Double> y

The second point in space.

Returns
Type Description
System.Double

The Euclidean distance between x and y.

View Source

Similarity(Sparse<Double>, Sparse<Double>)

Gets a similarity measure between two points.

Declaration
public double Similarity(Sparse<double> x, Sparse<double> y)
Parameters
Type Name Description
Sparse<System.Double> x

The first point to be compared.

Sparse<System.Double> y

The second point to be compared.

Returns
Type Description
System.Double

A similarity measure between x and y.

View Source

Similarity(Double, Double)

Gets a similarity measure between two points.

Declaration
public double Similarity(double x, double y)
Parameters
Type Name Description
System.Double x

The first point to be compared.

System.Double y

The second point to be compared.

Returns
Type Description
System.Double

A similarity measure between x and y.

View Source

Similarity(Double[], Double[])

Gets a similarity measure between two points.

Declaration
public double Similarity(double[] x, double[] y)
Parameters
Type Name Description
System.Double[] x

The first point to be compared.

System.Double[] y

The second point to be compared.

Returns
Type Description
System.Double

A similarity measure between x and y.

View Source

Similarity(Tuple<Double, Double>, Tuple<Double, Double>)

Gets a similarity measure between two points.

Declaration
public double Similarity(Tuple<double, double> x, Tuple<double, double> y)
Parameters
Type Name Description
Tuple<System.Double, System.Double> x

The first point to be compared.

Tuple<System.Double, System.Double> y

The second point to be compared.

Returns
Type Description
System.Double

A similarity measure between x and y.

Implements

IMetric<T>
IDistance<T>
IDistance<T, U>
ISimilarity<T>
ISimilarity<T, U>
IMetric<T>
IDistance<T>
IDistance<T, U>
ISimilarity<T>
ISimilarity<T, U>
IMetric<T>
IDistance<T>
IDistance<T, U>
ISimilarity<T>
ISimilarity<T, U>
IDistance<T>
IDistance<T, U>
ISimilarity<T>
ISimilarity<T, U>
ICloneable

Extension Methods

EnumExtensions.GetSymbol<T>(T)
ArrayExtensions.Concatenate<T>(T, T[])
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>, Func<TSource, Boolean>)
ObjectExtensions.Clone<T>(T)
ObjectExtensions.AddressOf<T>(T)
ObjectExtensions.ToByteArray<T>(T)
ReflectionExtensions.GetPropertyInfo<T, TValue>(T, Expression<Func<T, TValue>>)

See Also

SquareEuclidean
WeightedSquareEuclidean
WeightedEuclidean