|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.tuwien.ifs.somtoolbox.layers.metrics.AbstractMetric
at.tuwien.ifs.somtoolbox.layers.metrics.L2Metric
at.tuwien.ifs.somtoolbox.layers.metrics.L2MetricFast
public class L2MetricFast
Implements a fast version of the L2 or Euclidean metric, by not taking the square root. Thus, this implementation should be used only when the ranking of distances is important, and the total distance value does not matter.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class at.tuwien.ifs.somtoolbox.layers.metrics.L2Metric |
---|
L2Metric.L2MetricMatrix |
Nested classes/interfaces inherited from interface at.tuwien.ifs.somtoolbox.layers.metrics.DistanceMetric |
---|
DistanceMetric.SparcseMetricModes |
Field Summary |
---|
Fields inherited from class at.tuwien.ifs.somtoolbox.layers.metrics.AbstractMetric |
---|
PACKAGE_NAME |
Constructor Summary | |
---|---|
L2MetricFast()
|
Method Summary | |
---|---|
double |
distance(double[] vector1,
double[] vector2)
Calculates the distance between two vectors provided by argument vector1 and vector2 . |
java.lang.String |
toString()
|
Methods inherited from class at.tuwien.ifs.somtoolbox.layers.metrics.L2Metric |
---|
main, norm |
Methods inherited from class at.tuwien.ifs.somtoolbox.layers.metrics.AbstractMetric |
---|
checkDimensions, checkDimensions, compareTo, distance, distance, distance, distance, distance, distance, distance, distance, instantiate, instantiateNice, meanVector, performanceTest, setMetricParams, transformValue, transformVector |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface at.tuwien.ifs.somtoolbox.layers.metrics.DistanceMetric |
---|
distance, distance, distance, distance, distance, distance, distance, distance, setMetricParams, transformValue, transformVector |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Constructor Detail |
---|
public L2MetricFast()
Method Detail |
---|
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 L2Metric
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 L2Metric
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |