hep.aida
Interface ICloud1D
-
- All Superinterfaces:
- IBaseHistogram, ICloud
- All Known Implementing Classes:
- Cloud1D
public interface ICloud1D extends ICloud
User level interface to a 1D Cloud.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidconvert(double[] binEdges)Convert internally the ICloud1D to an IHistogram1D with given bin edges.voidconvert(int nBins, double lowerEdge, double upperEdge)Convert internally the ICloud1D to an IHistogram1D with given number of bins, upper edge and lower edge.voidfill(double x)Fill the ICloud1D with a value and a corresponding weight.voidfill(double x, double weight)Fill the ICloud1D with a value and a corresponding weight.voidfillHistogram(IHistogram1D hist)Project the ICloud1D on an IHistogram1D.IHistogram1Dhistogram()Get the internal IHistogram1D in which the ICloud1D converted to.doublelowerEdge()Get the lower edge of the ICloud1D.doublemean()Get the mean of the ICloud1D.doublerms()Get the RMS of the ICloud1D.voidsetConversionParameters(int bins, double lowerEdge, double upperEdge)Set the parameters for the ICloud conversion to an IHistogram.doubleupperEdge()Get the upper edge of the ICloud1D.doublevalue(int index)Get the value corresponding to a given entry.doubleweight(int index)Get the weight corresponding to a given entry.-
Methods inherited from interface hep.aida.ICloud
convertToHistogram, isConverted, maxEntries, scale, sumOfWeights
-
Methods inherited from interface hep.aida.IBaseHistogram
annotation, dimension, entries, nanEntries, reset, setTitle, title
-
-
-
-
Method Detail
-
fill
void fill(double x) throws java.lang.IllegalArgumentException
Fill the ICloud1D with a value and a corresponding weight. If either the value or the weight is NaN the entry will be recorded but it will not contribue to the statistics.- Parameters:
x- The value.- Throws:
java.lang.IllegalArgumentException- If the ICloud1D is full or if the weight's value is not between 0 and 1.
-
fill
void fill(double x, double weight) throws java.lang.IllegalArgumentExceptionFill the ICloud1D with a value and a corresponding weight. If either the value or the weight is NaN the entry will be recorded but it will not contribue to the statistics.- Parameters:
x- The value.weight- The corresponding weight. By default it is 1.- Throws:
java.lang.IllegalArgumentException- If the ICloud1D is full or if the weight's value is not between 0 and 1.
-
lowerEdge
double lowerEdge()
Get the lower edge of the ICloud1D.- Returns:
- The lower edge.
-
upperEdge
double upperEdge()
Get the upper edge of the ICloud1D.- Returns:
- The upper edge.
-
value
double value(int index) throws AlreadyConvertedExceptionGet the value corresponding to a given entry.- Parameters:
index- The entry's index.- Returns:
- The value of the index-th entry.
- Throws:
AlreadyConvertedException- If the ICloud1D has already been converted.
-
weight
double weight(int index) throws AlreadyConvertedExceptionGet the weight corresponding to a given entry.- Parameters:
index- The entry's index.- Returns:
- The weight of the index-th entry.
- Throws:
AlreadyConvertedException- If the ICloud has already been converted.
-
mean
double mean()
Get the mean of the ICloud1D.- Returns:
- The mean.
-
rms
double rms()
Get the RMS of the ICloud1D.- Returns:
- The RMS.
-
convert
void convert(int nBins, double lowerEdge, double upperEdge) throws AlreadyConvertedExceptionConvert internally the ICloud1D to an IHistogram1D with given number of bins, upper edge and lower edge.- Parameters:
nBins- The number of bins.lowerEdge- The lower edge.upperEdge- The upper edge.- Throws:
AlreadyConvertedException- If the ICloud1D has already been converted.
-
convert
void convert(double[] binEdges) throws AlreadyConvertedExceptionConvert internally the ICloud1D to an IHistogram1D with given bin edges.- Parameters:
binEdges- The bins edges.- Throws:
AlreadyConvertedException- If the ICloud1D has already been converted.
-
histogram
IHistogram1D histogram() throws java.lang.RuntimeException
Get the internal IHistogram1D in which the ICloud1D converted to.- Returns:
- The histogram.
- Throws:
java.lang.RuntimeException- If the ICloud1D did not convert either automatically or because of a convert() method invocation.
-
fillHistogram
void fillHistogram(IHistogram1D hist) throws java.lang.RuntimeException
Project the ICloud1D on an IHistogram1D.- Parameters:
hist- The IHistogram1D to be filled.- Throws:
java.lang.RuntimeException- If the ICloud1D is already converted.
-
setConversionParameters
void setConversionParameters(int bins, double lowerEdge, double upperEdge) throws java.lang.IllegalArgumentExceptionSet the parameters for the ICloud conversion to an IHistogram.- Parameters:
bins- The number of bins of the conversion IHistogram.lowerEdge- The lower edge of the conversion IHistogram.upperEdge- The upper edge of the conversion IHistogram.- Throws:
java.lang.IllegalArgumentException
-
-
DMelt 3.0 © DataMelt by jWork.ORG