

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
public abstract class AbstractBin1D
Abstract base class for all 1dimensional bins consumes double elements. First see the package summary and javadoc tree view to get the broad picture.
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.
Field Summary 

Fields inherited from class cern.colt.PersistentObject 

serialVersionUID 
Constructor Summary  

protected 
AbstractBin1D()
Makes this class non instantiable, but still let's others inherit from it. 
Method Summary  

abstract void 
add(double element)
Adds the specified element to the receiver. 
void 
addAllOf(DoubleArrayList list)
Adds all values of the specified list 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. 
DoubleBuffer 
buffered(int capacity)
Constructs and returns a streaming buffer connected to the receiver. 
java.lang.String 
compareWith(AbstractBin1D other)
Computes the deviations from the receiver's measures to another bin's measures. 
boolean 
equals(java.lang.Object object)
Returns whether two bins are equal; They are equal if the other object is of the same class or a subclass of this class and both have the same size, minimum, maximum, sum and sumOfSquares. 
abstract double 
max()
Returns the maximum. 
double 
mean()
Returns the arithmetic mean, which is Sum( x[i] ) / size(). 
abstract double 
min()
Returns the minimum. 
protected double 
relError(double measure1,
double measure2)
Computes the relative error (in percent) from one measure to another. 
double 
rms()
Returns the rms (Root Mean Square), which is Math.sqrt( Sum( x[i]*x[i] ) / size() ). 
double 
standardDeviation()
Returns the sample standard deviation, which is Math.sqrt(variance()). 
double 
standardError()
Returns the sample standard error, which is Math.sqrt(variance() / size()) 
abstract double 
sum()
Returns the sum of all elements, which is Sum( x[i] ). 
abstract double 
sumOfSquares()
Returns the sum of squares, which is Sum( x[i] * x[i] ). 
java.lang.String 
toString()
Returns a String representation of the receiver. 
void 
trimToSize()
Trims the capacity of the receiver to be the receiver's current size. 
double 
variance()
Returns the sample variance, which is Sum( (x[i]mean())^{2} ) / (size()1). 
Methods inherited from class hep.aida.bin.AbstractBin 

center, center, clear, error, error, isRebinnable, offset, offset, size, 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 
Constructor Detail 

protected AbstractBin1D()
Method Detail 

public abstract void add(double element)
element
 element to be appended.public final void addAllOf(DoubleArrayList list)
addAllOf
in interface DoubleBufferConsumer
list
 the list of which all values shall be added.public void addAllOfFromTo(DoubleArrayList list, int from, int to)
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 DoubleBuffer buffered(int capacity)
capacity
 the number of elements the buffer shall be capable of holding before overflowing and flushing to the receiver.
public java.lang.String compareWith(AbstractBin1D other)
other
 the other bin to compare with
public boolean equals(java.lang.Object object)
equals
in class AbstractBin
public abstract double max()
public double mean()
public abstract double min()
protected double relError(double measure1, double measure2)
public double rms()
public double standardDeviation()
public double standardError()
public abstract double sum()
public abstract double sumOfSquares()
public java.lang.String toString()
toString
in class AbstractBin
public void trimToSize()
trimToSize
in class AbstractBin
public double variance()


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