Class IntegerHistogram
- java.lang.Object
-
- com.actelion.research.calc.histogram.IntegerHistogram
-
public class IntegerHistogram extends java.lang.Object
IntegerHistogramCopyright: Actelion Ltd., Inc. All Rights Reserved This software is the proprietary information of Actelion Pharmaceuticals, Ltd. Use is subject to license terms.
- Version:
- 1.0 Jun 11, 2013 MvK Start implementation Nov 6, 2014 MvK getBinsEquallyDistributed(...) adapted for the case that the range is below the number of bins. Jun 09, 2016 improved formatting in toString() method.
- Author:
- Modest von Korff
-
-
Field Summary
Fields Modifier and Type Field Description static int[][]
ARR_BINS_EXAMPLE
-
Constructor Summary
Constructors Constructor Description IntegerHistogram(int[][] arrBins)
IntegerHistogram(int[][] arrBins, boolean consecutive)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int v)
Added to the bin where fullfilling the criteria v >= lower bound and v < higher bound.void
add(int[] a)
void
add(java.util.List<java.lang.Integer> li)
static int[][]
getBinsEquallyDistributed(int bins, int maxValue)
static int[][]
getBinsEquallyDistributed(int bins, int minValue, int maxValue)
int[]
getBinWithNPercentOfAllCounts(int percent)
int
getTotalCounts()
static void
main(java.lang.String[] args)
java.lang.String
toString()
-
-
-
Method Detail
-
add
public void add(int v)
Added to the bin where fullfilling the criteria v >= lower bound and v < higher bound.- Parameters:
v
-
-
add
public void add(int[] a)
-
add
public void add(java.util.List<java.lang.Integer> li)
-
getTotalCounts
public int getTotalCounts()
-
getBinWithNPercentOfAllCounts
public int[] getBinWithNPercentOfAllCounts(int percent)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
main
public static void main(java.lang.String[] args)
-
getBinsEquallyDistributed
public static int[][] getBinsEquallyDistributed(int bins, int maxValue)
-
getBinsEquallyDistributed
public static int[][] getBinsEquallyDistributed(int bins, int minValue, int maxValue)
-
-