Package table

Class MetricType

All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
IntegerType, RealType

public abstract class MetricType extends OrdinalType
Class for metric types for data tables.
Since:
2006.09.16
See Also:
  • Constructor Details

    • MetricType

      public MetricType()
      Create a metric type.
      Since:
      2023.07.26 (Christian Borgelt)
  • Method Details

    • getMinNumber

      public abstract double getMinNumber()
      Get the minimal value.
      Returns:
      the minimal value
      Since:
      2007.02.09 (Christian Borgelt)
    • getMaxNumber

      public abstract double getMaxNumber()
      Get the maximal value.
      Returns:
      the maximal value
      Since:
      2007.02.09 (Christian Borgelt)
    • clearInfo

      public void clearInfo()
      Clear all additional information.
      Overrides:
      clearInfo in class ColType
      Since:
      2013.12.26 (Christian Borgelt)
    • getInfoCount

      public int getInfoCount()
      Get the number of values with additional information.

      Different numbers of (numeric) levels can be associated with additional information.

      Overrides:
      getInfoCount in class OrdinalType
      Returns:
      the number of values
      Since:
      2013.12.26 (Christian Borgelt)
    • getInfo

      public Object getInfo(Object value)
      Get the additional information for a value.
      Overrides:
      getInfo in class OrdinalType
      Parameters:
      value - the value for which to get the additional information
      Returns:
      the additional information associated with the identifier
      Since:
      2013.12.26 (Christian Borgelt)
    • setInfo

      public void setInfo(Object value, Object info)
      Set the additional information for a value.
      Overrides:
      setInfo in class OrdinalType
      Parameters:
      value - the value to add/modify
      info - the additional information to store
      Since:
      2013.12.26 (Christian Borgelt)
    • getInfo

      public Object getInfo(int id)
      Get the additional information for a value given its identifier.
      Overrides:
      getInfo in class OrdinalType
      Parameters:
      id - the identifier of the value
      Returns:
      the additional information associated with the identifier
      Since:
      2013.12.26 (Christian Borgelt)
    • setInfo

      public void setInfo(int id, Object info)
      Set the additional information for a value given its identifier.
      Overrides:
      setInfo in class OrdinalType
      Parameters:
      id - the identifier of the value
      info - the additional information to store
      Since:
      2013.12.26 (Christian Borgelt)
    • sum

      public abstract Object sum(Object a, Object b)
      Sum two values.
      Parameters:
      a - the first value
      b - the second value
      Returns:
      the sum of the two values
      Since:
      2007.02.02 (Christian Borgelt)
    • diff

      public abstract Object diff(Object a, Object b)
      Compute the difference of two values
      Parameters:
      a - the value from which to subtract
      b - the value to subtract
      Returns:
      the difference of the two values
      Since:
      2007.02.02 (Christian Borgelt)