Package table
Class MetricType
java.lang.Object
table.ColType
table.OrdinalType
table.MetricType
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
IntegerType
,RealType
Class for metric types for data tables.
- Since:
- 2006.09.16
- See Also:
-
Field Summary
Fields inherited from class table.OrdinalType
maxinfo, mininfo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear all additional information.abstract Object
Compute the difference of two valuesgetInfo
(int id) Get the additional information for a value given its identifier.Get the additional information for a value.int
Get the number of values with additional information.abstract double
Get the maximal value.abstract double
Get the minimal value.void
Set the additional information for a value given its identifier.void
Set the additional information for a value.abstract Object
Sum two values.Methods inherited from class table.OrdinalType
compare, getMax, getMaxInfo, getMin, getMinInfo, getValue, setMaxInfo, setMinInfo
Methods inherited from class table.ColType
addType, addValue, addValue, clear, clone, findValue, fits, getAllTypeNames, getAllTypeNames, getName, getNumberAt, getStorageClass, getStringAt, getTypeClass, getTypeClass, getTypeCount, getTypeId, getTypeId, getTypeName, getValueAt, getValueClass, getValueCount, getValueId, isNull, parseType, parseValue, setNull, setNull, setValueAt, toString
-
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. -
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 classOrdinalType
- Returns:
- the number of values
- Since:
- 2013.12.26 (Christian Borgelt)
-
getInfo
Get the additional information for a value.- Overrides:
getInfo
in classOrdinalType
- 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
Set the additional information for a value.- Overrides:
setInfo
in classOrdinalType
- Parameters:
value
- the value to add/modifyinfo
- the additional information to store- Since:
- 2013.12.26 (Christian Borgelt)
-
getInfo
Get the additional information for a value given its identifier.- Overrides:
getInfo
in classOrdinalType
- Parameters:
id
- the identifier of the value- Returns:
- the additional information associated with the identifier
- Since:
- 2013.12.26 (Christian Borgelt)
-
setInfo
Set the additional information for a value given its identifier.- Overrides:
setInfo
in classOrdinalType
- Parameters:
id
- the identifier of the valueinfo
- the additional information to store- Since:
- 2013.12.26 (Christian Borgelt)
-
sum
Sum two values.- Parameters:
a
- the first valueb
- the second value- Returns:
- the sum of the two values
- Since:
- 2007.02.02 (Christian Borgelt)
-
diff
Compute the difference of two values- Parameters:
a
- the value from which to subtractb
- the value to subtract- Returns:
- the difference of the two values
- Since:
- 2007.02.02 (Christian Borgelt)
-