|
Mobios v0.91 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmobios.dist.CountedMetric
public class CountedMetric
Wrapper around a base Metric that counts the invocations of
Metric.getDistance(IndexObject,IndexObject). Additional methods to get and clear the
counter are provided.
| Constructor Summary | |
|---|---|
CountedMetric(Metric baseMetric)
Creates a CountedMetric with a given base Metric, setting the
internal counter to zero. |
|
| Method Summary | |
|---|---|
void |
clear()
Sets the internal counter to zero. |
int |
getCounter()
Returns the current value of the internal counter. |
double |
getDistance(IndexObject one,
IndexObject two)
Returns the value of Metric.getDistance(IndexObject,IndexObject) for the base
Metric and increments the internal counter. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CountedMetric(Metric baseMetric)
CountedMetric with a given base Metric, setting the
internal counter to zero.
| Method Detail |
|---|
public final double getDistance(IndexObject one,
IndexObject two)
Metric.getDistance(IndexObject,IndexObject) for the base
Metric and increments the internal counter.
getDistance in interface Metricone - the first IndexObject to compute distance ontwo - the second IndexObject to compute distance on
public final int getCounter()
public final void clear()
|
Mobios v0.91 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||