## Class MultiLPNorm

• All Implemented Interfaces:
Distance<NumberVector>, NumberVectorDistance<NumberVector>, PrimitiveDistance<NumberVector>

public class MultiLPNorm
extends AbstractNumberVectorDistance
Tutorial example Minowski-distance variation with different exponents for different dimensions for ELKI.
Since:
0.5.0
Author:
Erich Schubert
• ### Nested Class Summary

Nested Classes
Modifier and Type Class Description
static class  MultiLPNorm.Par
Parameterization class example
• ### Field Summary

Fields
Modifier and Type Field Description
(package private) double pinv
Normalization factor (count(ps)/sum(ps))
(package private) double[] ps
The exponents
• ### Constructor Summary

Constructors
Constructor Description
MultiLPNorm​(double[] ps)
Constructor.
• ### Method Summary

All Methods
Modifier and Type Method Description
double distance​(NumberVector o1, NumberVector o2)
Computes the distance between two given vectors according to this distance function.
SimpleTypeInformation<? super NumberVector> getInputTypeRestriction()
Get the input data type of the function.
• ### Methods inherited from class elki.distance.AbstractNumberVectorDistance

dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality, dimensionality
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Methods inherited from interface elki.distance.Distance

isMetric, isSquared, isSymmetric
• ### Methods inherited from interface elki.distance.PrimitiveDistance

instantiate
• ### Field Detail

• #### ps

double[] ps
The exponents
• #### pinv

double pinv
Normalization factor (count(ps)/sum(ps))
• ### Constructor Detail

• #### MultiLPNorm

public MultiLPNorm​(double[] ps)
Constructor.
Parameters:
ps - The exponents
• ### Method Detail

• #### distance

public double distance​(NumberVector o1,
NumberVector o2)
Description copied from interface: NumberVectorDistance
Computes the distance between two given vectors according to this distance function.
Parameters:
o1 - first vector
o2 - second vector
Returns:
the distance between two given vectors according to this distance function
• #### getInputTypeRestriction

public SimpleTypeInformation<? super NumberVector> getInputTypeRestriction()
Description copied from interface: Distance
Get the input data type of the function.
Specified by:
getInputTypeRestriction in interface Distance<NumberVector>
Specified by:
getInputTypeRestriction in interface PrimitiveDistance<NumberVector>
Overrides:
getInputTypeRestriction in class AbstractNumberVectorDistance
Returns:
Type restriction