public class LnMetric extends AbstractMetric implements DistanceMetric
Modifier and Type | Class and Description |
---|---|
(package private) class |
LnMetric.LnMetricMatrix |
DistanceMetric.SparcseMetricModes
Modifier and Type | Field and Description |
---|---|
private LnMetric.LnMetricMatrix |
LN_METRIC_MATRIX |
private double |
n |
private double |
root |
PACKAGE_NAME
Constructor and Description |
---|
LnMetric(double power) |
Modifier and Type | Method and Description |
---|---|
double |
distance(double[] vector1,
double[] vector2)
Calculates the distance between two vectors provided by argument
vector1 and vector2 . |
double |
distance(cern.colt.matrix.DoubleMatrix1D vector1,
cern.colt.matrix.DoubleMatrix1D vector2)
Calculates the distance between two vectors provided by argument
vector1 and vector2 . |
java.lang.String |
toString() |
checkDimensions, checkDimensions, compareTo, distance, distance, distance, distance, distance, distance, distance, instantiate, instantiateNice, meanVector, performanceTest, setMetricParams, transformValue, transformVector
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
distance, distance, distance, distance, distance, distance, distance, setMetricParams, transformValue, transformVector
private final LnMetric.LnMetricMatrix LN_METRIC_MATRIX
private double n
private double root
public double distance(double[] vector1, double[] vector2) throws MetricException
DistanceMetric
vector1
and vector2
. A
MetricException
is thrown, if the dimensionalities of the two vectors differ.distance
in interface DistanceMetric
distance
in class AbstractMetric
vector1
- first vector.vector2
- second vector.vector1
and vector2
.MetricException
- if the dimensionalities of the two vectors differ.DistanceMetric.distance(double[], double[])
public java.lang.String toString()
toString
in class java.lang.Object
public double distance(cern.colt.matrix.DoubleMatrix1D vector1, cern.colt.matrix.DoubleMatrix1D vector2) throws MetricException
DistanceMetric
vector1
and vector2
. A
MetricException
is thrown, if the dimensionalities of the two vectors differ.distance
in interface DistanceMetric
distance
in class AbstractMetric
vector1
- first vector.vector2
- second vector.vector1
and vector2
.MetricException
- if the dimensionalities of the two vectors differ.DistanceMetric.distance(cern.colt.matrix.DoubleMatrix1D,
cern.colt.matrix.DoubleMatrix1D)