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

Namespace:  CenterSpace.NMath.Stats
Assembly:  NMathStats (in NMathStats.dll) Version: 3.4.0.0

Syntax

C#
public static Distance..::.Function PowerFunction(
	double p,
	double r
)
Visual Basic (Declaration)
Public Shared Function PowerFunction ( _
	p As Double, _
	r As Double _
) As Distance..::.Function
Visual C++
public:
static Distance..::.Function^ PowerFunction(
	double p, 
	double r
)

Parameters

p
Type: System..::.Double

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

r
Type: System..::.Double

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

Remarks

The power distance is computed as:
CopyC#
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