All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class hep.analysis.AutoPartition

java.lang.Object
   |
   +----java.util.Observable
           |
           +----hep.analysis.Partition
                   |
                   +----hep.analysis.Abstract1DPartition
                           |
                           +----hep.analysis.AutoPartition

public class AutoPartition
extends Abstract1DPartition
At first, an automatic partition acts like a simple partition, filling within any range. After a fixed number of entries, the partition fixes a range and bins within that range.


Constructor Index

 o AutoPartition()
Creates an automatic partition, using automatic range and the default values:
 o AutoPartition(double, double)
Creates an automatic partition, using a given range with the default values: When the binning cutoff is reached, the given range will be used unless setBinning(int, double, double) is called.
 o AutoPartition(int, int)
Created an automatic partition, with automatic range and the given values for the auto binning cutoff and number of bins.
 o AutoPartition(int, int, double, double)
Created an automatic partition, with the given range and the given values for the auto binning cutoff and number of bins.

Method Index

 o clear()
Resets the partition to default settings.
 o fill(double)
Invokes the fill(double, double) method with a weighting value of 1.
 o fill(double, double)
Fills the associated histogram with a numerical value.
 o getArea()
Return the area of the distribution.
 o getBinAt(double)
Returns the bin index corresponding to the given numerical value.
 o getBins()
Return an array containing the sizes of all the bins.
 o getEntries()
Return the number of entries.
 o getErrors()
Return an array containing the errors for all the bins.
 o getMax()
Return the maximum in the distribution.
 o getMean()
Return the mean of the distribution.
 o getMin()
Return the minimum in the distribution.
 o getNumberOfBins()
Return the number of bins.
 o getOverflow()
Return the overflow for the partition.
 o getRMS()
Return the RMS of the distribution.
 o getStatistics()
 o getUnderflow()
Return the underflow for the partition.
 o hasSimpleQuadraticErrorBars()
Returns false by default.
 o isRebinnable()
Returns false by default.
 o newComplexEntry()
 o newSimpleEntry()
 o setBinning(int, double, double)
Override to allow binning to be set.
 o setSnapshot(boolean)
Sets the snap shot mode of the partition.

Constructors

 o AutoPartition
 public AutoPartition()
Creates an automatic partition, using automatic range and the default values:

 o AutoPartition
 public AutoPartition(int autoCutoff,
                      int nBins)
Created an automatic partition, with automatic range and the given values for the auto binning cutoff and number of bins.

Parameters:
autoCutoff - after this many entries, the partition will fix a range and always bin within that range (value must be greater than zero)
nBins - the partition will use this many bins (value must be greater than zero)
Throws: IllegalArgumentException
if autoCutoff <= 0 or if nBins <= 0
 o AutoPartition
 public AutoPartition(double min,
                      double max)
Creates an automatic partition, using a given range with the default values: When the binning cutoff is reached, the given range will be used unless setBinning(int, double, double) is called.

Parameters:
min - the initial minimum for the range (will change if setBinning(int, double, double) is called)
max - the initial maximum for the range (will change if setBinning(int, double, double) is called)
See Also:
setBinning
 o AutoPartition
 public AutoPartition(int autoCutoff,
                      int nBins,
                      double min,
                      double max)
Created an automatic partition, with the given range and the given values for the auto binning cutoff and number of bins. When the binning cutoff is reached, the given range will be used unless setBinning(int, double, double) is called.

Parameters:
autoCutoff - after this many entries, the partition will fix a range and always bin within that range (value must be greater than zero)
nBins - the partition will use this many bins (value must be greater than zero)
min - the initial minimum for the range (will change if setBinning(int, double, double) is called)
max - the initial maximum for the range (will change if setBinning(int, double, double) is called)
Throws: IllegalArgumentException
if autoCutoff <= 0 or if nBins <= 0
See Also:
setBinning

Methods

 o setSnapshot
 public void setSnapshot(boolean useSnapShot)
Sets the snap shot mode of the partition.

Overrides:
setSnapshot in class Abstract1DPartition
 o newSimpleEntry
 protected final void newSimpleEntry()
 o newComplexEntry
 protected final void newComplexEntry()
 o fill
 public final void fill(double x)
Invokes the fill(double, double) method with a weighting value of 1.

Overrides:
fill in class Abstract1DPartition
 o fill
 public final void fill(double x,
                        double v)
Fills the associated histogram with a numerical value.

Overrides:
fill in class Abstract1DPartition
 o setBinning
 public final void setBinning(int bins,
                              double min,
                              double max)
Override to allow binning to be set.

Overrides:
setBinning in class Abstract1DPartition
 o isRebinnable
 public final boolean isRebinnable()
Returns false by default.

Overrides:
isRebinnable in class Abstract1DPartition
 o getStatistics
 public final Statistics getStatistics()
 o clear
 public final void clear()
Resets the partition to default settings.

Overrides:
clear in class Abstract1DPartition
 o getBinAt
 public final int getBinAt(double x) throws NoSuchBinException
Returns the bin index corresponding to the given numerical value.

Overrides:
getBinAt in class Abstract1DPartition
 o getBins
 public final double[] getBins()
Return an array containing the sizes of all the bins.

Overrides:
getBins in class Abstract1DPartition
 o getErrors
 protected final double[] getErrors()
Return an array containing the errors for all the bins.

Overrides:
getErrors in class Abstract1DPartition
 o getOverflow
 public final double getOverflow()
Return the overflow for the partition.

Overrides:
getOverflow in class Abstract1DPartition
 o getUnderflow
 public final double getUnderflow()
Return the underflow for the partition.

Overrides:
getUnderflow in class Abstract1DPartition
 o getEntries
 public final int getEntries()
Return the number of entries.

Overrides:
getEntries in class Abstract1DPartition
 o getArea
 public final double getArea()
Return the area of the distribution.

Overrides:
getArea in class Abstract1DPartition
 o getMean
 public final double getMean()
Return the mean of the distribution.

Overrides:
getMean in class Abstract1DPartition
 o getRMS
 public final double getRMS()
Return the RMS of the distribution.

Overrides:
getRMS in class Abstract1DPartition
 o getMin
 public final double getMin()
Return the minimum in the distribution.

Overrides:
getMin in class Abstract1DPartition
 o getMax
 public final double getMax()
Return the maximum in the distribution.

Overrides:
getMax in class Abstract1DPartition
 o hasSimpleQuadraticErrorBars
 public final boolean hasSimpleQuadraticErrorBars()
Returns false by default.

Overrides:
hasSimpleQuadraticErrorBars in class Abstract1DPartition
 o getNumberOfBins
 public final int getNumberOfBins()
Return the number of bins.

Overrides:
getNumberOfBins in class Abstract1DPartition

All Packages  Class Hierarchy  This Package  Previous  Next  Index