

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object cern.colt.PersistentObject hep.aida.bin.AbstractBin hep.aida.bin.AbstractBin1D hep.aida.bin.StaticBin1D
public class StaticBin1D
1dimensional nonrebinnable bin consuming double elements; Efficiently computes basic statistics of data sequences. First see the package summary and javadoc tree view to get the broad picture.
The data streamed into a SimpleBin1D is not preserved!
As a consequence infinitely many elements can be added to this bin.
As a further consequence this bin cannot compute more than basic statistics.
It is also not rebinnable.
If these drawbacks matter, consider to use a DynamicBin1D
,
which overcomes them at the expense of increased memory requirements.
This class is fully thread safe (all public methods are synchronized). Thus, you can have one or more threads adding to the bin as well as one or more threads reading and viewing the statistics of the bin while it is filled. For high performance, add data in large chunks (buffers) via method addAllOf rather than piecewise via method add.
Implementation: Incremental maintainance. Performance linear in the number of elements added.
Field Summary  

protected static double[] 
arguments
Function arguments used by method addAllOf(...) For memory tuning only. 
protected double 
max

protected double 
min

protected int 
size
The number of elements consumed by incremental parameter maintainance. 
protected double 
sum

protected double 
sum_xx

Fields inherited from class cern.colt.PersistentObject 

serialVersionUID 
Constructor Summary  

StaticBin1D()
Constructs and returns an empty bin. 
Method Summary  

void 
add(double element)
Adds the specified element to the receiver. 
void 
addAllOfFromTo(DoubleArrayList list,
int from,
int to)
Adds the part of the specified list between indexes from (inclusive) and to (inclusive) to the receiver. 
void 
clear()
Removes all elements from the receiver. 
protected void 
clearAllMeasures()
Resets the values of all measures. 
boolean 
isRebinnable()
Returns false. 
double 
max()
Returns the maximum. 
double 
min()
Returns the minimum. 
int 
size()
Returns the number of elements contained in the receiver. 
double 
sum()
Returns the sum of all elements, which is Sum( x[i] ). 
double 
sumOfSquares()
Returns the sum of squares, which is Sum( x[i] * x[i] ). 
Methods inherited from class hep.aida.bin.AbstractBin1D 

addAllOf, buffered, compareWith, equals, mean, relError, rms, standardDeviation, standardError, toString, trimToSize, variance 
Methods inherited from class hep.aida.bin.AbstractBin 

center, center, error, error, offset, offset, value, value 
Methods inherited from class cern.colt.PersistentObject 

clone 
Methods inherited from class java.lang.Object 

finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait 
Field Detail 

protected int size
protected double min
protected double max
protected double sum
protected double sum_xx
protected static transient double[] arguments
Constructor Detail 

public StaticBin1D()
Method Detail 

public void add(double element)
add
in class AbstractBin1D
element
 element to be appended.public void addAllOfFromTo(DoubleArrayList list, int from, int to)
addAllOfFromTo
in class AbstractBin1D
list
 the list of which elements shall be added.from
 the index of the first element to be added (inclusive).to
 the index of the last element to be added (inclusive).
java.lang.IndexOutOfBoundsException
 if list.size()>0 && (from<0  from>to  to>=list.size()).public void clear()
clear
in class AbstractBin
protected void clearAllMeasures()
public boolean isRebinnable()
isRebinnable
in class AbstractBin
public double max()
max
in class AbstractBin1D
public double min()
min
in class AbstractBin1D
public int size()
size
in class AbstractBin
public double sum()
sum
in class AbstractBin1D
public double sumOfSquares()
sumOfSquares
in class AbstractBin1D


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 