|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.simulator.math.QualityMeasure
org.simulator.math.N_Metric
public class N_Metric
An implementation of an n-metric. An n-metric is basically the nth root of the sum of the distances of every single element in two vectors (arrays), where this distance will always be exponentiated by the value of n.
Field Summary | |
---|---|
protected double |
root
The n of the metric. |
Fields inherited from class org.simulator.math.QualityMeasure |
---|
defaultValue, meanFunction |
Constructor Summary | |
---|---|
N_Metric()
Constructs a new NMetric with a default root of two. |
|
N_Metric(double root)
Constructs a new NMetric with a customized root. |
Method Summary | |
---|---|
double |
distance(MultiTable.Block.Column x,
MultiTable.Block.Column y,
double defaultValue)
Returns the distance of the two vectors x and y with the given root. |
double |
distanceToZero(MultiTable.Block.Column x,
double defaultValue)
|
double |
getRoot()
Returns the n of the metric. |
void |
setRoot(double root)
Sets the root. |
Methods inherited from class org.simulator.math.QualityMeasure |
---|
distance, distance, distance, getColumnDistances, getDefaultValue, getMeanFunction, setDefaultValue, setMeanFunction |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double root
Constructor Detail |
---|
public N_Metric()
public N_Metric(double root)
root
- Method Detail |
---|
public double distance(MultiTable.Block.Column x, MultiTable.Block.Column y, double defaultValue)
QualityMeasure
Double.NaN
values are also ignored.
distance
in class QualityMeasure
x
- an arrayy
- another arraydefaultValue
- The value to be returned in cases in which no distance
computation is possible.
public double getRoot()
public void setRoot(double root)
root
- public double distanceToZero(MultiTable.Block.Column x, double defaultValue)
x
- expecteddefaultValue
-
|
Generated at April 19 2013 Version 1.3 Revision 424 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |