|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.tuwien.ifs.feature.extraction.audio.distance.AbstractMetric
at.tuwien.ifs.feature.extraction.audio.distance.L1Metric
public class L1Metric
Implements the L1 or city block metric. Though this class could use at.ec3.somtoolbox.layers.metrics.LNMetric, for performance issues this less complex computation should be used.
Constructor Summary | |
---|---|
L1Metric()
|
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.feature.extraction.audio.distance.AbstractMetric |
---|
checkDimensions, instantiate, meanVector |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public L1Metric()
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 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |