Click or drag to resize

DistancePowerDistance(Double, Double) Constructor

Constructs a PowerDistance instance using the given parameters.

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

Parameters

p  Double

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

r  Double

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

Remarks
The power distance is computed as:
C#
distance( x, y ) = ( |xi - yi|^p )^1/r
Appropriate selections of p and r yield Euclidean, squared Euclidean, Minkowski, city-block, and many other distance metrics. For example, if p and r are equal to 2, the power distance is equal to the Euclidean distance.
See Also