Click or drag to resize

DistancePowerDistanceGetDistance Method

Returns the power distance between two data sets, using the current values of parameters p and r.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public double GetDistance(
	DoubleVector data1,
	DoubleVector data2
)

Parameters

data1  DoubleVector
The first data set.
data2  DoubleVector
The second data set.

Return Value

Double
The power distance between data1 and data2.
Exceptions
ExceptionCondition
MismatchedSizeException Thrown if the given data sets do not have equal lengths.
Remarks
The power distance is computed as:
C#
distance( x, y ) = ( |xi - yi|^p )^1/r
Missing values are allowed. Pairs of elements are excluded from the distance measure when their comparison returns NaN. If all pairs are excluded, NaN is returned for the distance measure.
See Also