hep.analysis.partition
Class OneDDelegatingPartition

java.lang.Object
  |
  +--java.util.Observable
        |
        +--hep.analysis.Partition
              |
              +--hep.analysis.partition.Abstract1DPartition
                    |
                    +--hep.analysis.partition.OneDDelegatingPartition
All Implemented Interfaces:
OneDDataSource, OneDFillable, RangeChangeListener, java.io.Serializable, StatisticsProvider, TwoDFillable
Direct Known Subclasses:
AutoPartition, FixedPartition, SimplePartition, StringPartition

public abstract class OneDDelegatingPartition
extends Abstract1DPartition

See Also:
Serialized Form

Fields inherited from class hep.analysis.Partition
DATE, DELTATIME, DOUBLE, HORIZONTAL_AXIS, INTEGER, m_owner, STRING, VERTICAL_AXIS
 
Constructor Summary
OneDDelegatingPartition()
           
 
Method Summary
 void clear()
          Resets the partition to default settings.
 void fill(java.util.Date d)
          Invokes the fill(Date, double) method with a weighting value of 1.
 void fill(double d)
          Invokes the fill(double, double) method with a weighting value of 1.
 void fill(int i)
          Invokes the fill(int, double) method with a weighting value of 1.
 void fill(java.lang.String s)
          Invokes the fill(String, double) method with a weighting value of 1.
 void fillW(java.util.Date d, double weight)
          Fills the associated histogram with a date value.
 void fillW(double d, double weight)
          Fills the associated histogram with a numerical value.
 void fillW(int i, double weight)
          Converts the given int parameter to type double and calls fill(double, double).
 void fillW(java.lang.String s, double weight)
          Fills the associated histogram with a string value.
 java.lang.String[] getAxisLabels()
          Override to allow axis labels to be accessed.
 int getAxisType()
          Return the Axis type
 double[] getBins()
          Return an array containing the sizes of all the bins.
 double getMax()
          Return the maximum in the distribution.
 double getMin()
          Return the minimum in the distribution.
 double[] getMinusErrors()
           
 int getNumberOfBins()
          Return the number of bins.
 double[] getPlusErrors()
          Return an array containing the errors for all the bins.
 Statistics getStatistics()
           
 boolean hasAsymmetricErrorBars()
          Returns false by default.
 boolean hasSimpleQuadraticErrorBars()
          Returns false by default.
 boolean isRebinnable()
          Returns false by default.
protected  void setBinInfo(BinInfo info)
           
 void setBinning(int bins, double min, double max)
          Override to allow binning to be set.
protected  void setDataSource(OneDDataSource source)
           
protected  void setFillable(OneDFillable fillable)
           
protected  void setStatisticsProvider(StatisticsProvider provider)
           
 
Methods inherited from class hep.analysis.partition.Abstract1DPartition
clearDataChanged, clearRangeChanged, done, fill, fill, fillW, fillW, getBin, getBinAt, getBinAt, getBinAt, getBinAt, getError, getMinusError, getPlusError, notifyObservers, rangeChanged, setDataAndRangeChanged, setDataAndRangeChangedNow, setDataChanged, setRangeChanged
 
Methods inherited from class hep.analysis.Partition
destroy, getStyle, makeCopy, setStyle
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneDDelegatingPartition

public OneDDelegatingPartition()
Method Detail

fill

public void fill(double d)
Description copied from class: Abstract1DPartition
Invokes the fill(double, double) method with a weighting value of 1.
Overrides:
fill in class Abstract1DPartition
Following copied from class: hep.analysis.partition.Abstract1DPartition
Parameters:
x - the value to fill
See Also:
Abstract1DPartition.fillW(double, double)

fill

public void fill(int i)
Description copied from class: Abstract1DPartition
Invokes the fill(int, double) method with a weighting value of 1.
Overrides:
fill in class Abstract1DPartition
Following copied from class: hep.analysis.partition.Abstract1DPartition
Parameters:
x - the value to fill
See Also:
Abstract1DPartition.fillW(int, double)

fill

public void fill(java.lang.String s)
Description copied from class: Abstract1DPartition
Invokes the fill(String, double) method with a weighting value of 1.
Overrides:
fill in class Abstract1DPartition
Following copied from class: hep.analysis.partition.Abstract1DPartition
Parameters:
x - the value to fill
See Also:
Abstract1DPartition.fillW(String, double)

fill

public void fill(java.util.Date d)
Description copied from class: Abstract1DPartition
Invokes the fill(Date, double) method with a weighting value of 1.
Overrides:
fill in class Abstract1DPartition
Following copied from class: hep.analysis.partition.Abstract1DPartition
Parameters:
x - the value to fill
See Also:
Abstract1DPartition.fillW(Date, double)

fillW

public void fillW(double d,
                  double weight)
Description copied from class: Abstract1DPartition
Fills the associated histogram with a numerical value. Subclasses must override this method with a partition-specific implementation to prevent a PartitionFillException (i.e., override this method if your subclass will support numerical binning).
Overrides:
fillW in class Abstract1DPartition
Following copied from class: hep.analysis.partition.Abstract1DPartition
Parameters:
x - the value to fill
v - a partition-specific value (normally some weighting value)
Throws:
PartitionFillException - if this method is not overridden
See Also:
PartitionFillException

fillW

public void fillW(int i,
                  double weight)
Description copied from class: Abstract1DPartition
Converts the given int parameter to type double and calls fill(double, double).
Overrides:
fillW in class Abstract1DPartition
Following copied from class: hep.analysis.partition.Abstract1DPartition
Parameters:
x - the value to fill
v - a partition-specific value (normally some weighting value)
Throws:
PartitionFillException - if thrown from fill(double, double)
See Also:
Abstract1DPartition.fill(double, double), PartitionFillException

fillW

public void fillW(java.lang.String s,
                  double weight)
Description copied from class: Abstract1DPartition
Fills the associated histogram with a string value. Subclasses must override this method with a partition-specific implementation to prevent a PartitionFillException (i.e., override this method if your subclass will support string binning).
Overrides:
fillW in class Abstract1DPartition
Following copied from class: hep.analysis.partition.Abstract1DPartition
Parameters:
x - the value to fill
v - a partition-specific value (normally some weighting value)
Throws:
PartitionFillException - if not overridden
See Also:
PartitionFillException

fillW

public void fillW(java.util.Date d,
                  double weight)
Description copied from class: Abstract1DPartition
Fills the associated histogram with a date value. Subclasses must override this method with a partition-specific implementation to prevent a PartitionFillException (i.e., override this method if your subclass will support date binning).
Overrides:
fillW in class Abstract1DPartition
Following copied from class: hep.analysis.partition.Abstract1DPartition
Parameters:
x - the value to fill
v - a partition-specific value (normally some weighting value)
Throws:
PartitionFillException - if not overridden
See Also:
PartitionFillException

clear

public void clear()
Description copied from class: Abstract1DPartition
Resets the partition to default settings.
Overrides:
clear in class Abstract1DPartition

getStatistics

public Statistics getStatistics()

hasAsymmetricErrorBars

public boolean hasAsymmetricErrorBars()
Description copied from class: Abstract1DPartition
Returns false by default. Override to have asymmetric error bars.
Overrides:
hasAsymmetricErrorBars in class Abstract1DPartition

hasSimpleQuadraticErrorBars

public boolean hasSimpleQuadraticErrorBars()
Description copied from class: Abstract1DPartition
Returns false by default. Override to have simple quadratic error bars.
Overrides:
hasSimpleQuadraticErrorBars in class Abstract1DPartition

getPlusErrors

public double[] getPlusErrors()
Description copied from class: Abstract1DPartition
Return an array containing the errors for all the bins.
Overrides:
getPlusErrors in class Abstract1DPartition

getMinusErrors

public double[] getMinusErrors()
Overrides:
getMinusErrors in class Abstract1DPartition

getBins

public double[] getBins()
Description copied from class: Abstract1DPartition
Return an array containing the sizes of all the bins.
Overrides:
getBins in class Abstract1DPartition

isRebinnable

public boolean isRebinnable()
Description copied from class: Abstract1DPartition
Returns false by default. Override to have a rebinnable partition.
Overrides:
isRebinnable in class Abstract1DPartition

setBinning

public void setBinning(int bins,
                       double min,
                       double max)
Description copied from class: Abstract1DPartition
Override to allow binning to be set. Throws an UnsupportedPartitionMethodException by default.
Overrides:
setBinning in class Abstract1DPartition
Following copied from class: hep.analysis.partition.Abstract1DPartition
Parameters:
bins - the number of bins to have
min - the minimum of the partition range
max - the maximum of the partition range
Throws:
UnsupportedPartitionMethodException - if not overridden.

getAxisLabels

public java.lang.String[] getAxisLabels()
Description copied from class: Abstract1DPartition
Override to allow axis labels to be accessed. Throws an UnsupportedPartitionMethodException by default.
Overrides:
getAxisLabels in class Abstract1DPartition
Following copied from class: hep.analysis.partition.Abstract1DPartition
Returns:
an array of axis labels

getAxisType

public int getAxisType()
Description copied from class: Abstract1DPartition
Return the Axis type
Overrides:
getAxisType in class Abstract1DPartition

getNumberOfBins

public int getNumberOfBins()
Description copied from class: Abstract1DPartition
Return the number of bins.
Overrides:
getNumberOfBins in class Abstract1DPartition

getMin

public double getMin()
Description copied from class: Abstract1DPartition
Return the minimum in the distribution.
Overrides:
getMin in class Abstract1DPartition

getMax

public double getMax()
Description copied from class: Abstract1DPartition
Return the maximum in the distribution.
Overrides:
getMax in class Abstract1DPartition

setFillable

protected void setFillable(OneDFillable fillable)

setDataSource

protected void setDataSource(OneDDataSource source)

setStatisticsProvider

protected void setStatisticsProvider(StatisticsProvider provider)

setBinInfo

protected void setBinInfo(BinInfo info)