Package com.amalgamasimulation.utils
Class FixedHistogramDataAggregator<C,O>
java.lang.Object
com.amalgamasimulation.utils.HistogramDataAggregator<C,O>
com.amalgamasimulation.utils.FixedHistogramDataAggregator<C,O>
- Type Parameters:
C- type of categoryO- type of objects associated with data points
A
HistogramDataAggregator with fixed number of buckets. The size of
buckets can change as the data points get added to this aggregator.
Useful to store data about distributions for which there is some a priori knowledge about the possible range of arguments.
In case of exceeding the maximum allowable number of baskets, merges adjacent baskets in pairs.
Baskets do not store each added value, instead store sums and number of values.
For example, the service level can be distributed in the range from 0% to 100% and have the distribution can have bucket size of 10%. This would allow to visually compare distributions of service levels of different scenarios.
- Author:
- Alexey Kirillov
-
Nested Class Summary
Nested classes/interfaces inherited from class com.amalgamasimulation.utils.HistogramDataAggregator
HistogramDataAggregator.HistogramDataGroup, HistogramDataAggregator.MaxArgumentDescriptor -
Field Summary
Fields inherited from class com.amalgamasimulation.utils.HistogramDataAggregator
argumentObjectsCount, argumentsSum, biggestArgumentObjects, biggestArgumentObjectsMap, biggestGroup, categories, count, createInitialZeroGroup, dataGroups, groupSize, groupSizeModifier, initialGroupLeftBound, lastBucketIncludesRightBorder, maxArgumentDescriptor, maxGroupsCount, minGroupSizeAsPowerOf10, smallestArgumentObjects, smallestArgumentObjectsMap, sum -
Constructor Summary
ConstructorsConstructorDescriptionFixedHistogramDataAggregator(List<C> categories, boolean lastBucketIncludesRightBorder, double groupSize, int argumentObjectsCount) FixedHistogramDataAggregator(List<C> categories, boolean lastBucketIncludesRightBorder, double groupSize, int argumentObjectsCount, boolean createInitialZeroGroup) FixedHistogramDataAggregator(List<C> categories, boolean lastBucketIncludesRightBorder, double initialGroupSize, int argumentObjectsCount, boolean createInitialZeroGroup, int maxGroupsCount) FixedHistogramDataAggregator(List<C> categories, boolean lastBucketIncludesRightBorder, double groupSize, int argumentObjectsCount, double initialGroupLeftBound) FixedHistogramDataAggregator(List<C> categories, boolean lastBucketIncludesRightBorder, double initialGroupSize, int argumentObjectsCount, double initialGroupLeftBound, int maxGroupsCount) FixedHistogramDataAggregator(List<C> categories, boolean lastBucketIncludesRightBorder, double initialGroupSize, int argumentObjectsCount, double initialGroupLeftBound, int maxGroupsCount, int initialGroupsCount) FixedHistogramDataAggregator(List<C> categories, double groupSize, int argumentObjectsCount) FixedHistogramDataAggregator(List<C> categories, double groupSize, int argumentObjectsCount, boolean createInitialZeroGroup) FixedHistogramDataAggregator(List<C> categories, double initialGroupSize, int argumentObjectsCount, boolean createInitialZeroGroup, int maxGroupsCount) FixedHistogramDataAggregator(List<C> categories, double groupSize, int argumentObjectsCount, double initialGroupLeftBound) FixedHistogramDataAggregator(List<C> categories, double initialGroupSize, int argumentObjectsCount, double initialGroupLeftBound, int maxGroupsCount) FixedHistogramDataAggregator(List<C> categories, double initialGroupSize, int argumentObjectsCount, double initialGroupLeftBound, int maxGroupsCount, int initialGroupsCount) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddValueInternal(double argument, C category, double value, O obj) protected voidMethods inherited from class com.amalgamasimulation.utils.HistogramDataAggregator
addDataGroup, addDataGroup, addValue, addValue, clear, getAverage, getBiggestArgumentObjects, getBiggestArgumentObjectValue, getBiggestGroup, getCategories, getCount, getDataGroup, getDataGroups, getGroupSize, getMaxArgument, getMaxGroupsCount, getMinArgument, getMinGroupSizeAsPowerOf10, getSmallestArgumentObjects, getSmallestArgumentObjectValue, getSum, onDataGroupAdd, onDataGroupsAdjust, onDataGroupsClear, recalculateBiggestGroup, setMinGroupSizeAsPowerOf10, toString, updateMaxArgumentDescriptor
-
Constructor Details
-
FixedHistogramDataAggregator
-
FixedHistogramDataAggregator
-
FixedHistogramDataAggregator
-
FixedHistogramDataAggregator
-
FixedHistogramDataAggregator
-
FixedHistogramDataAggregator
-
FixedHistogramDataAggregator
-
FixedHistogramDataAggregator
-
FixedHistogramDataAggregator
-
FixedHistogramDataAggregator
-
FixedHistogramDataAggregator
-
FixedHistogramDataAggregator
-
-
Method Details
-
addValueInternal
- Specified by:
addValueInternalin classHistogramDataAggregator<C,O>
-
adjustDataGroups
protected void adjustDataGroups()- Specified by:
adjustDataGroupsin classHistogramDataAggregator<C,O>
-