Class QuantileCombiner
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.layer.Combiner
-
- uk.ac.starlink.ttools.plot2.layer.QuantileCombiner
-
@Equality public abstract class QuantileCombiner extends Combiner
Combiner implementation that accumulates all input points per pixel for custom combination by a user-supplied object. This kind of accumulation is likely to be very expensive on memory and probably CPU as well, but it's the only way in general to calculate quantities like the per-pixel median.- Since:
- 6 Nov 2015
- Author:
- Mark Taylor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
QuantileCombiner.Quantiler
Defines the calculation of the combined result from submitted data values.-
Nested classes/interfaces inherited from class uk.ac.starlink.ttools.plot2.layer.Combiner
Combiner.Container, Combiner.Type
-
-
Constructor Summary
Constructors Constructor Description QuantileCombiner(java.lang.String name, java.lang.String description, QuantileCombiner.Quantiler quantiler)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArrayBinList
createArrayBinList(int size)
May be able to create a bin list suitable for non-sparse, moderate-sized index ranges.Combiner.Container
createContainer()
Creates an object which can be used to accumulate values.boolean
equals(java.lang.Object o)
int
hashCode()
-
Methods inherited from class uk.ac.starlink.ttools.plot2.layer.Combiner
createCombinedInfo, getDescription, getKnownCombiners, getName, getType, hasBigBin, toString
-
-
-
-
Constructor Detail
-
QuantileCombiner
public QuantileCombiner(java.lang.String name, java.lang.String description, QuantileCombiner.Quantiler quantiler)
Constructor.- Parameters:
name
- combiner namedescription
- combiner descriptionquantiler
- object to combine the actual submitted data values
-
-
Method Detail
-
createArrayBinList
public ArrayBinList createArrayBinList(int size)
Description copied from class:Combiner
May be able to create a bin list suitable for non-sparse, moderate-sized index ranges. If a combiner implementation is able to provide an ArrayBinList implementation that should be significantly more efficient than a HashBinList, this method should return it. If not, it can return null.- Specified by:
createArrayBinList
in classCombiner
- Parameters:
size
- index range of required bin list- Returns:
- array-based bin list, or null
-
createContainer
public Combiner.Container createContainer()
Description copied from class:Combiner
Creates an object which can be used to accumulate values.Note: Since many container instances may by generated (when using a HashBinList) it is desirable to keep the returned objects as small as possible. In particular, it's a good idea to make the returned objects instances of a static class, to avoid an unncecessary reference to the owner object, unless there's a really compelling reason to do otherwise.
- Specified by:
createContainer
in classCombiner
- Returns:
- new container
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
-