Enum Combiner.Type
- java.lang.Object
-
- java.lang.Enum<Combiner.Type>
-
- uk.ac.starlink.ttools.plot2.layer.Combiner.Type
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Combiner.Type>
- Enclosing class:
- Combiner
public static enum Combiner.Type extends java.lang.Enum<Combiner.Type>
Defines the scaling properties of a combiner. This also provides information on how the results of the populated bin list should be interpreted.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getBinFactor(double binExtent)
Returns a scaling factor which ought to be applied to bin values.boolean
isExtensive()
Indicates whether the bin values scale to first order with the number of submitted values per bin.static Combiner.Type
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Combiner.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
EXTENSIVE
public static final Combiner.Type EXTENSIVE
Sum-like aggregation. To first order, the bin result quantities scale linearly with the number of values submitted. If a bin value is NaN because no values have been submitted, it can be interpreted as zero.
-
INTENSIVE
public static final Combiner.Type INTENSIVE
Average-like aggregation. To first order, the bin result quantities are not dependent on the number of values submitted. No numeric value can be assumed if a bin value is NaN because no values have been submitted.
-
DENSITY
public static final Combiner.Type DENSITY
Density-like aggregation. This is likeEXTENSIVE
, but results should be divided by bin size; thegetBinFactor
method in general will return a value that is not unity.
-
-
Method Detail
-
values
public static Combiner.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Combiner.Type c : Combiner.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Combiner.Type valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
isExtensive
public boolean isExtensive()
Indicates whether the bin values scale to first order with the number of submitted values per bin.- Returns:
- true iff no submitted values corresponds to a zero bin value
-
getBinFactor
public double getBinFactor(double binExtent)
Returns a scaling factor which ought to be applied to bin values. This may be unity, or it may depend on the supplied bin extent.- Parameters:
binExtent
- bin size in some natural units- Returns:
- factor to multiply bin contents by before use
-
-