Click or drag to resize

DistancePowerFunction Method

Power distance function. Encapsulates GetDistance() on a newly constructed Distance.PowerDistance object as a Distance.Function delegate.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public static DistanceFunction PowerFunction(
	double p,
	double r
)

Parameters

p  Double

[Missing <param name="p"/> documentation for "M:CenterSpace.NMath.Core.Distance.PowerFunction(System.Double,System.Double)"]

r  Double

[Missing <param name="r"/> documentation for "M:CenterSpace.NMath.Core.Distance.PowerFunction(System.Double,System.Double)"]

Return Value

DistanceFunction
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