viper.comparison.distances
Class DefaultMeasures

java.lang.Object
  extended byviper.comparison.distances.DefaultMeasures

public final class DefaultMeasures
extends java.lang.Object

Stores the default measure information for each attribute type. These will be used when the user requests an evaluation on a type, but doesn't specify the metric and/or tolerance.


Constructor Summary
DefaultMeasures()
           
 
Method Summary
static java.lang.String getDefaultMetricFor(AbstractAttribute attr)
          Gets the default metric for the given attribute data type.
static java.lang.String getDefaultMetricFor(java.lang.String attrType)
          Gets the default metric for the given attribute data type.
static double getDefaultToleranceFor(AbstractAttribute attr)
          Gets the current tolerance setting for the attribute type.
static double getDefaultToleranceFor(java.lang.String attrType)
          Gets the default tolerance for the attribute type.
static void setDefaultMetricFor(AbstractAttribute attr, java.lang.String metric)
          Sets the default metric for the given attribute data type.
static void setDefaultMetricFor(java.lang.String attrType, java.lang.String metric)
          Sets the default metric for the given attribute data type.
static void setDefaultToleranceFor(AbstractAttribute attr, double val)
          Gets the current tolerance setting for the attribute type.
static void setDefaultToleranceFor(java.lang.String attrType, double val)
          Gets the current tolerance setting for the attribute type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMeasures

public DefaultMeasures()
Method Detail

getDefaultToleranceFor

public static double getDefaultToleranceFor(java.lang.String attrType)
Gets the default tolerance for the attribute type.

Parameters:
attrType - the data type
Returns:
the tolerance, or not-a-number, if none exists

getDefaultToleranceFor

public static double getDefaultToleranceFor(AbstractAttribute attr)
Gets the current tolerance setting for the attribute type. It doesn't really make sense to change this without changing the metric, as well.

Parameters:
attr - the attribute
Returns:
the tolerance for descriptor localiation

setDefaultToleranceFor

public static void setDefaultToleranceFor(java.lang.String attrType,
                                          double val)
Gets the current tolerance setting for the attribute type. It doesn't really make sense to change this without changing the metric, as well.

Parameters:
attrType - the attribute data type
val - the new default localization tolerance for the attribute

setDefaultToleranceFor

public static void setDefaultToleranceFor(AbstractAttribute attr,
                                          double val)
Gets the current tolerance setting for the attribute type. It doesn't really make sense to change this without changing the metric, as well.

Parameters:
attr - the attribute data type
val - the new default localization tolerance for the attribute

setDefaultMetricFor

public static void setDefaultMetricFor(java.lang.String attrType,
                                       java.lang.String metric)
                                throws ImproperMetricException
Sets the default metric for the given attribute data type.

Parameters:
attrType - the type of data
metric - the new metric
Throws:
ImproperMetricException - if the metric is not valid for the given attribute type

setDefaultMetricFor

public static void setDefaultMetricFor(AbstractAttribute attr,
                                       java.lang.String metric)
                                throws ImproperMetricException
Sets the default metric for the given attribute data type.

Parameters:
attr - the type of data
metric - the new metric
Throws:
ImproperMetricException - if the metric is not valid for the given attribute type

getDefaultMetricFor

public static java.lang.String getDefaultMetricFor(java.lang.String attrType)
Gets the default metric for the given attribute data type.

Parameters:
attrType - the type of data
Returns:
the default metric

getDefaultMetricFor

public static java.lang.String getDefaultMetricFor(AbstractAttribute attr)
Gets the default metric for the given attribute data type.

Parameters:
attr - the type of data
Returns:
the default metric