public class Binner
extends java.lang.Object
The array type starts at bytes and is dynamically adjusted to contain counts up to int size to save on memory. Is this overengineered?
Constructor and Description |
---|
Binner(int n)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getCount(int index)
Returns the count in a given bin.
|
int |
getLength()
Returns the number of bins.
|
long |
getTotal()
Returns the total number of increments made to this binner.
|
void |
increment(int index)
Increments the count in a given bin by 1.
|
public int getLength()
public void increment(int index)
index
- bin indexpublic int getCount(int index)
index
- bin indexpublic long getTotal()
Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.