public class ProbabilisticPNormDistanceFunction extends java.lang.Object implements DistanceFunction
| Modifier and Type | Field and Description |
|---|---|
private int |
c
The parameter of the normalization.
|
private int |
p
The parameter for the p-norm.
|
private static long |
serialVersionUID |
| Constructor and Description |
|---|
ProbabilisticPNormDistanceFunction(int p,
int c)
Creates a new p-norm distance function where distances are normalized.
|
| Modifier and Type | Method and Description |
|---|---|
double |
distance(java.util.List<java.lang.Double> l1,
java.util.List<java.lang.Double> l2)
Measures the distance between the two vectors.
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
java.lang.String |
toString() |
private static final long serialVersionUID
private int p
private int c
public ProbabilisticPNormDistanceFunction(int p,
int c)
p - the parameter for the p-norm.c - the parameter of the normalization.public double distance(java.util.List<java.lang.Double> l1,
java.util.List<java.lang.Double> l2)
DistanceFunctiondistance in interface DistanceFunctionl1 - some list of doubles.l2 - some list of doubles.public java.lang.String toString()
toString in interface DistanceFunctiontoString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object