Package uk.ac.starlink.ttools.plot
Interface BinnedData
-
- All Known Implementing Classes:
MapBinnedData,NormalisedBinnedData
public interface BinnedDataStores and dispenses binned data for a histogram.- Since:
- 11 Nov 2005
- Author:
- Mark Taylor
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceBinnedData.BinRepresents a single bin.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Iterator<BinnedData.Bin>getBinIterator(boolean includeEmpty)Returns an iterator over the bins managed by this object.intgetSetCount()Returns the number of subsets for which this object maintains bins.booleanisInteger()Indicates whether the count values in the bins are known to be integers.voidsubmitDatum(double value, double weight, boolean[] setFlags)Submits a value for inclusion in this BinnedData object.
-
-
-
Method Detail
-
submitDatum
void submitDatum(double value, double weight, boolean[] setFlags)Submits a value for inclusion in this BinnedData object. As well as the value itself and a weight, a mask of boolean flags is given that indicates which subsets are considered to contain the submitted value.- Parameters:
value- value for inclusionweight- weightingsetFlags- array of flags, one for each subset; true for inclusion, false for exclusion
-
getBinIterator
java.util.Iterator<BinnedData.Bin> getBinIterator(boolean includeEmpty)
Returns an iterator over the bins managed by this object. The bins must be returned in order (lowest data range bin to highest data range bin).It is inadvisable to call
submitDatum(double, double, boolean[])during the lifetime of this iterator.- Parameters:
includeEmpty- if true, then all bins between the lowest and highest must be iterated over. If false, then empty bins may be omitted- Returns:
- iterator which dispenses
BinnedData.Bininstances
-
getSetCount
int getSetCount()
Returns the number of subsets for which this object maintains bins.- Returns:
- set count
-
isInteger
boolean isInteger()
Indicates whether the count values in the bins are known to be integers.- Returns:
- true if all
Bin.getWeightedCountreturns are integer values
-
-