 | DistancePowerFunction Method |
Power distance function. Encapsulates GetDistance() on a newly constructed
Distance.PowerDistance object as a Distance.Function delegate.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntaxpublic static DistanceFunction PowerFunction(
double p,
double r
)
Public Shared Function PowerFunction (
p As Double,
r As Double
) As DistanceFunction
public:
static DistanceFunction^ PowerFunction(
double p,
double r
)
static member PowerFunction :
p : float *
r : float -> DistanceFunction
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:
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