uk.ac.starlink.ttools.plot2.layer
Enum Combiner.Type

java.lang.Object
  extended by java.lang.Enum<Combiner.Type>
      extended by uk.ac.starlink.ttools.plot2.layer.Combiner.Type
All Implemented Interfaces:
Serializable, Comparable<Combiner.Type>
Enclosing class:
Combiner

public static enum Combiner.Type
extends 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.


Enum Constant Summary
DENSITY
          Density-like aggregation.
EXTENSIVE
          Sum-like aggregation.
INTENSIVE
          Average-like aggregation.
 
Method Summary
 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(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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

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 like EXTENSIVE, but results should be divided by bin size; the getBinFactor 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(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:
IllegalArgumentException - if this enum type has no constant with the specified name
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


Copyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.