Portfolio Code | Clement Colmerauer
Repositories
Site
Rabbit simulation
Code
Commits
Branches
Tags
Search
Tree:
a20104a
Branches
Tags
master
Rabbit simulation
build
colt
doc
api
hep
aida
bin
DynamicBin1D.html
initial commit
Clement COLMERAUER
commited
a20104a
at 2024-09-09 10:17:52
DynamicBin1D.html
Blame
History
Raw
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.4.2_05) on Thu Sep 09 20:36:13 PDT 2004 --> <TITLE> DynamicBin1D (Colt 1.2.0 - API Specification) </TITLE> <META NAME="keywords" CONTENT="hep.aida.bin.DynamicBin1D class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="DynamicBin1D (Colt 1.2.0 - API Specification)"; } </SCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DynamicBin1D.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <b>Colt 1.2.0</b></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../hep/aida/bin/BinFunctions1D.html" title="class in hep.aida.bin"><B>PREV CLASS</B></A> <A HREF="../../../hep/aida/bin/MightyStaticBin1D.html" title="class in hep.aida.bin"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="DynamicBin1D.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#fields_inherited_from_class_cern.colt.PersistentObject">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> hep.aida.bin</FONT> <BR> Class DynamicBin1D</H2> <PRE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../cern/colt/PersistentObject.html" title="class in cern.colt">cern.colt.PersistentObject</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../hep/aida/bin/AbstractBin.html" title="class in hep.aida.bin">hep.aida.bin.AbstractBin</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../hep/aida/bin/AbstractBin1D.html" title="class in hep.aida.bin">hep.aida.bin.AbstractBin1D</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../hep/aida/bin/StaticBin1D.html" title="class in hep.aida.bin">hep.aida.bin.StaticBin1D</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../hep/aida/bin/MightyStaticBin1D.html" title="class in hep.aida.bin">hep.aida.bin.MightyStaticBin1D</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../hep/aida/bin/QuantileBin1D.html" title="class in hep.aida.bin">hep.aida.bin.QuantileBin1D</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><B>hep.aida.bin.DynamicBin1D</B> </PRE> <DL> <DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Cloneable.html" title="class or interface in java.lang">Cloneable</A>, <A HREF="../../../cern/colt/buffer/DoubleBufferConsumer.html" title="interface in cern.colt.buffer">DoubleBufferConsumer</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A></DD> </DL> <HR> <DL> <DT>public class <B>DynamicBin1D</B><DT>extends <A HREF="../../../hep/aida/bin/QuantileBin1D.html" title="class in hep.aida.bin">QuantileBin1D</A></DL> <P> 1-dimensional rebinnable bin holding <tt>double</tt> elements; Efficiently computes advanced statistics of data sequences. Technically speaking, a multiset (or bag) with efficient statistics operations defined upon. First see the <a href="package-summary.html">package summary</a> and javadoc <a href="package-tree.html">tree view</a> to get the broad picture. <p> The data filled into a <tt>DynamicBin1D</tt> is internally preserved in the bin. As a consequence this bin can compute more than only basic statistics. On the other hand side, if you add huge amounts of elements, you may run out of memory (each element takes 8 bytes). If this drawbacks matter, consider to use <A HREF="../../../hep/aida/bin/StaticBin1D.html" title="class in hep.aida.bin"><CODE>StaticBin1D</CODE></A>, which overcomes them at the expense of limited functionality. <p> 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 <i>while it is filled</i>. For high performance, add data in large chunks (buffers) via method <tt>addAllOf</tt> rather than piecewise via method <tt>add</tt>. <p> If your favourite statistics measure is not directly provided by this class, check out <A HREF="../../../cern/jet/stat/Descriptive.html" title="class in cern.jet.stat"><CODE>Descriptive</CODE></A> in combination with methods <A HREF="../../../hep/aida/bin/DynamicBin1D.html#elements()"><CODE>elements()</CODE></A> and <A HREF="../../../hep/aida/bin/DynamicBin1D.html#sortedElements()"><CODE>sortedElements()</CODE></A>. <p> <b>Implementation</b>: Lazy evaluation, caching, incremental maintainance. <P> <P> <DL> <DT><B>Version:</B></DT> <DD>0.9, 03-Jul-99</DD> <DT><B>See Also:</B><DD><A HREF="../../../cern/jet/stat/Descriptive.html" title="class in cern.jet.stat"><CODE>Descriptive</CODE></A>, <A HREF="../../../serialized-form.html#hep.aida.bin.DynamicBin1D">Serialized Form</A></DL> <HR> <P> <!-- ======== NESTED CLASS SUMMARY ======== --> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Field Summary</B></FONT></TD> </TR> </TABLE> <A NAME="fields_inherited_from_class_cern.colt.PersistentObject"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Fields inherited from class cern.colt.<A HREF="../../../cern/colt/PersistentObject.html" title="class in cern.colt">PersistentObject</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../cern/colt/PersistentObject.html#serialVersionUID">serialVersionUID</A></CODE></TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#DynamicBin1D()">DynamicBin1D</A></B>()</CODE> <BR> Constructs and returns an empty bin; implicitly calls <A HREF="../../../hep/aida/bin/DynamicBin1D.html#setFixedOrder(boolean)"><CODE>setFixedOrder(false)</CODE></A>.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Method Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#add(double)">add</A></B>(double element)</CODE> <BR> Adds the specified element to the receiver.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#addAllOfFromTo(cern.colt.list.DoubleArrayList, int, int)">addAllOfFromTo</A></B>(<A HREF="../../../cern/colt/list/DoubleArrayList.html" title="class in cern.colt.list">DoubleArrayList</A> list, int from, int to)</CODE> <BR> Adds the part of the specified list between indexes <tt>from</tt> (inclusive) and <tt>to</tt> (inclusive) to the receiver.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> double</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#aggregate(cern.colt.function.DoubleDoubleFunction, cern.colt.function.DoubleFunction)">aggregate</A></B>(<A HREF="../../../cern/colt/function/DoubleDoubleFunction.html" title="interface in cern.colt.function">DoubleDoubleFunction</A> aggr, <A HREF="../../../cern/colt/function/DoubleFunction.html" title="interface in cern.colt.function">DoubleFunction</A> f)</CODE> <BR> Applies a function to each element and aggregates the results.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#clear()">clear</A></B>()</CODE> <BR> Removes all elements from the receiver.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#clone()">clone</A></B>()</CODE> <BR> Returns a deep copy of the receiver.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> double</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#correlation(hep.aida.bin.DynamicBin1D)">correlation</A></B>(<A HREF="../../../hep/aida/bin/DynamicBin1D.html" title="class in hep.aida.bin">DynamicBin1D</A> other)</CODE> <BR> Returns the correlation of two bins, which is <tt>corr(x,y) = covariance(x,y) / (stdDev(x)*stdDev(y))</tt> (Pearson's correlation coefficient).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> double</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#covariance(hep.aida.bin.DynamicBin1D)">covariance</A></B>(<A HREF="../../../hep/aida/bin/DynamicBin1D.html" title="class in hep.aida.bin">DynamicBin1D</A> other)</CODE> <BR> Returns the covariance of two bins, which is <tt>cov(x,y) = (1/size()) * Sum((x[i]-mean(x)) * (y[i]-mean(y)))</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../cern/colt/list/DoubleArrayList.html" title="class in cern.colt.list">DoubleArrayList</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#elements()">elements</A></B>()</CODE> <BR> Returns a copy of the currently stored elements.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#equals(java.lang.Object)">equals</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> object)</CODE> <BR> Returns whether two bins are equal.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#frequencies(cern.colt.list.DoubleArrayList, cern.colt.list.IntArrayList)">frequencies</A></B>(<A HREF="../../../cern/colt/list/DoubleArrayList.html" title="class in cern.colt.list">DoubleArrayList</A> distinctElements, <A HREF="../../../cern/colt/list/IntArrayList.html" title="class in cern.colt.list">IntArrayList</A> frequencies)</CODE> <BR> Computes the frequency (number of occurances, count) of each distinct element.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#getMaxOrderForSumOfPowers()">getMaxOrderForSumOfPowers</A></B>()</CODE> <BR> Returns <tt>Integer.MAX_VALUE</tt>, the maximum order <tt>k</tt> for which sums of powers are retrievable.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#getMinOrderForSumOfPowers()">getMinOrderForSumOfPowers</A></B>()</CODE> <BR> Returns <tt>Integer.MIN_VALUE</tt>, the minimum order <tt>k</tt> for which sums of powers are retrievable.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#isRebinnable()">isRebinnable</A></B>()</CODE> <BR> Returns <tt>true</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> double</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#max()">max</A></B>()</CODE> <BR> Returns the maximum.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> double</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#min()">min</A></B>()</CODE> <BR> Returns the minimum.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> double</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#moment(int, double)">moment</A></B>(int k, double c)</CODE> <BR> Returns the moment of <tt>k</tt>-th order with value <tt>c</tt>, which is <tt>Sum( (x[i]-c)<sup>k</sup> ) / size()</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> double</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#quantile(double)">quantile</A></B>(double phi)</CODE> <BR> Returns the exact <tt>phi-</tt>quantile; that is, the smallest contained element <tt>elem</tt> for which holds that <tt>phi</tt> percent of elements are less than <tt>elem</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> double</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#quantileInverse(double)">quantileInverse</A></B>(double element)</CODE> <BR> Returns exactly how many percent of the elements contained in the receiver are <tt><= element</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../cern/colt/list/DoubleArrayList.html" title="class in cern.colt.list">DoubleArrayList</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#quantiles(cern.colt.list.DoubleArrayList)">quantiles</A></B>(<A HREF="../../../cern/colt/list/DoubleArrayList.html" title="class in cern.colt.list">DoubleArrayList</A> percentages)</CODE> <BR> Returns the exact quantiles of the specified percentages.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#removeAllOf(cern.colt.list.DoubleArrayList)">removeAllOf</A></B>(<A HREF="../../../cern/colt/list/DoubleArrayList.html" title="class in cern.colt.list">DoubleArrayList</A> list)</CODE> <BR> Removes from the receiver all elements that are contained in the specified list.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#sample(int, boolean, cern.jet.random.engine.RandomEngine, cern.colt.buffer.DoubleBuffer)">sample</A></B>(int n, boolean withReplacement, <A HREF="../../../cern/jet/random/engine/RandomEngine.html" title="class in cern.jet.random.engine">RandomEngine</A> randomGenerator, <A HREF="../../../cern/colt/buffer/DoubleBuffer.html" title="class in cern.colt.buffer">DoubleBuffer</A> buffer)</CODE> <BR> Uniformly samples (chooses) <tt>n</tt> random elements <i>with or without replacement</i> from the contained elements and adds them to the given buffer.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../hep/aida/bin/DynamicBin1D.html" title="class in hep.aida.bin">DynamicBin1D</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#sampleBootstrap(hep.aida.bin.DynamicBin1D, int, cern.jet.random.engine.RandomEngine, hep.aida.bin.BinBinFunction1D)">sampleBootstrap</A></B>(<A HREF="../../../hep/aida/bin/DynamicBin1D.html" title="class in hep.aida.bin">DynamicBin1D</A> other, int resamples, <A HREF="../../../cern/jet/random/engine/RandomEngine.html" title="class in cern.jet.random.engine">RandomEngine</A> randomGenerator, <A HREF="../../../hep/aida/bin/BinBinFunction1D.html" title="interface in hep.aida.bin">BinBinFunction1D</A> function)</CODE> <BR> Generic bootstrap resampling.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#setFixedOrder(boolean)">setFixedOrder</A></B>(boolean fixedOrder)</CODE> <BR> Determines whether the receivers internally preserved elements may be reordered or not.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#size()">size</A></B>()</CODE> <BR> Returns the number of elements contained in the receiver.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../cern/colt/list/DoubleArrayList.html" title="class in cern.colt.list">DoubleArrayList</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#sortedElements()">sortedElements</A></B>()</CODE> <BR> Returns a copy of the currently stored elements, sorted ascending.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#standardize(double, double)">standardize</A></B>(double mean, double standardDeviation)</CODE> <BR> Modifies the receiver to be standardized.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> double</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#sum()">sum</A></B>()</CODE> <BR> Returns the sum of all elements, which is <tt>Sum( x[i] )</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> double</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#sumOfInversions()">sumOfInversions</A></B>()</CODE> <BR> Returns the sum of inversions, which is <tt>Sum( 1 / x[i] )</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> double</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#sumOfLogarithms()">sumOfLogarithms</A></B>()</CODE> <BR> Returns the sum of logarithms, which is <tt>Sum( Log(x[i]) )</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> double</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#sumOfPowers(int)">sumOfPowers</A></B>(int k)</CODE> <BR> Returns the <tt>k-th</tt> order sum of powers, which is <tt>Sum( x[i]<sup>k</sup> )</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> double</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#sumOfSquares()">sumOfSquares</A></B>()</CODE> <BR> Returns the sum of squares, which is <tt>Sum( x[i] * x[i] )</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#toString()">toString</A></B>()</CODE> <BR> Returns a String representation of the receiver.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#trim(int, int)">trim</A></B>(int s, int l)</CODE> <BR> Removes the <tt>s</tt> smallest and <tt>l</tt> largest elements from the receiver.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> double</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#trimmedMean(int, int)">trimmedMean</A></B>(int s, int l)</CODE> <BR> Returns the trimmed mean.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../hep/aida/bin/DynamicBin1D.html#trimToSize()">trimToSize</A></B>()</CODE> <BR> Trims the capacity of the receiver to be the receiver's current size.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_hep.aida.bin.QuantileBin1D"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class hep.aida.bin.<A HREF="../../../hep/aida/bin/QuantileBin1D.html" title="class in hep.aida.bin">QuantileBin1D</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../hep/aida/bin/QuantileBin1D.html#compareWith(hep.aida.bin.AbstractBin1D)">compareWith</A>, <A HREF="../../../hep/aida/bin/QuantileBin1D.html#median()">median</A>, <A HREF="../../../hep/aida/bin/QuantileBin1D.html#sizeOfRange(double, double)">sizeOfRange</A>, <A HREF="../../../hep/aida/bin/QuantileBin1D.html#splitApproximately(cern.colt.list.DoubleArrayList, int)">splitApproximately</A>, <A HREF="../../../hep/aida/bin/QuantileBin1D.html#splitApproximately(hep.aida.IAxis, int)">splitApproximately</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_hep.aida.bin.MightyStaticBin1D"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class hep.aida.bin.<A HREF="../../../hep/aida/bin/MightyStaticBin1D.html" title="class in hep.aida.bin">MightyStaticBin1D</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../hep/aida/bin/MightyStaticBin1D.html#geometricMean()">geometricMean</A>, <A HREF="../../../hep/aida/bin/MightyStaticBin1D.html#harmonicMean()">harmonicMean</A>, <A HREF="../../../hep/aida/bin/MightyStaticBin1D.html#hasSumOfInversions()">hasSumOfInversions</A>, <A HREF="../../../hep/aida/bin/MightyStaticBin1D.html#hasSumOfLogarithms()">hasSumOfLogarithms</A>, <A HREF="../../../hep/aida/bin/MightyStaticBin1D.html#hasSumOfPowers(int)">hasSumOfPowers</A>, <A HREF="../../../hep/aida/bin/MightyStaticBin1D.html#kurtosis()">kurtosis</A>, <A HREF="../../../hep/aida/bin/MightyStaticBin1D.html#product()">product</A>, <A HREF="../../../hep/aida/bin/MightyStaticBin1D.html#skew()">skew</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_hep.aida.bin.AbstractBin1D"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class hep.aida.bin.<A HREF="../../../hep/aida/bin/AbstractBin1D.html" title="class in hep.aida.bin">AbstractBin1D</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../hep/aida/bin/AbstractBin1D.html#addAllOf(cern.colt.list.DoubleArrayList)">addAllOf</A>, <A HREF="../../../hep/aida/bin/AbstractBin1D.html#buffered(int)">buffered</A>, <A HREF="../../../hep/aida/bin/AbstractBin1D.html#mean()">mean</A>, <A HREF="../../../hep/aida/bin/AbstractBin1D.html#rms()">rms</A>, <A HREF="../../../hep/aida/bin/AbstractBin1D.html#standardDeviation()">standardDeviation</A>, <A HREF="../../../hep/aida/bin/AbstractBin1D.html#standardError()">standardError</A>, <A HREF="../../../hep/aida/bin/AbstractBin1D.html#variance()">variance</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_hep.aida.bin.AbstractBin"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class hep.aida.bin.<A HREF="../../../hep/aida/bin/AbstractBin.html" title="class in hep.aida.bin">AbstractBin</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../hep/aida/bin/AbstractBin.html#center()">center</A>, <A HREF="../../../hep/aida/bin/AbstractBin.html#center(int)">center</A>, <A HREF="../../../hep/aida/bin/AbstractBin.html#error()">error</A>, <A HREF="../../../hep/aida/bin/AbstractBin.html#error(int)">error</A>, <A HREF="../../../hep/aida/bin/AbstractBin.html#offset()">offset</A>, <A HREF="../../../hep/aida/bin/AbstractBin.html#offset(int)">offset</A>, <A HREF="../../../hep/aida/bin/AbstractBin.html#value()">value</A>, <A HREF="../../../hep/aida/bin/AbstractBin.html#value(int)">value</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TD> </TR> </TABLE> <A NAME="DynamicBin1D()"><!-- --></A><H3> DynamicBin1D</H3> <PRE> public <B>DynamicBin1D</B>()</PRE> <DL> <DD>Constructs and returns an empty bin; implicitly calls <A HREF="../../../hep/aida/bin/DynamicBin1D.html#setFixedOrder(boolean)"><CODE>setFixedOrder(false)</CODE></A>. <P> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Method Detail</B></FONT></TD> </TR> </TABLE> <A NAME="add(double)"><!-- --></A><H3> add</H3> <PRE> public void <B>add</B>(double element)</PRE> <DL> <DD>Adds the specified element to the receiver. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/StaticBin1D.html#add(double)">add</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/StaticBin1D.html" title="class in hep.aida.bin">StaticBin1D</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>element</CODE> - element to be appended.</DL> </DD> </DL> <HR> <A NAME="addAllOfFromTo(cern.colt.list.DoubleArrayList, int, int)"><!-- --></A><H3> addAllOfFromTo</H3> <PRE> public void <B>addAllOfFromTo</B>(<A HREF="../../../cern/colt/list/DoubleArrayList.html" title="class in cern.colt.list">DoubleArrayList</A> list, int from, int to)</PRE> <DL> <DD>Adds the part of the specified list between indexes <tt>from</tt> (inclusive) and <tt>to</tt> (inclusive) to the receiver. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/QuantileBin1D.html#addAllOfFromTo(cern.colt.list.DoubleArrayList, int, int)">addAllOfFromTo</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/QuantileBin1D.html" title="class in hep.aida.bin">QuantileBin1D</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>list</CODE> - the list of which elements shall be added.<DD><CODE>from</CODE> - the index of the first element to be added (inclusive).<DD><CODE>to</CODE> - the index of the last element to be added (inclusive). <DT><B>Throws:</B> <DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - if <tt>list.size()>0 && (from<0 || from>to || to>=list.size())</tt>.</DL> </DD> </DL> <HR> <A NAME="aggregate(cern.colt.function.DoubleDoubleFunction, cern.colt.function.DoubleFunction)"><!-- --></A><H3> aggregate</H3> <PRE> public double <B>aggregate</B>(<A HREF="../../../cern/colt/function/DoubleDoubleFunction.html" title="interface in cern.colt.function">DoubleDoubleFunction</A> aggr, <A HREF="../../../cern/colt/function/DoubleFunction.html" title="interface in cern.colt.function">DoubleFunction</A> f)</PRE> <DL> <DD>Applies a function to each element and aggregates the results. Returns a value <tt>v</tt> such that <tt>v==a(size())</tt> where <tt>a(i) == aggr( a(i-1), f(x(i)) )</tt> and terminators are <tt>a(1) == f(x(0)), a(0)==Double.NaN</tt>. <p> <b>Example:</b> <pre> cern.jet.math.Functions F = cern.jet.math.Functions.functions; bin = 0 1 2 3 // Sum( x[i]*x[i] ) bin.aggregate(F.plus,F.square); --> 14 </pre> For further examples, see the <a href="package-summary.html#FunctionObjects">package doc</a>. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>aggr</CODE> - an aggregation function taking as first argument the current aggregation and as second argument the transformed current element.<DD><CODE>f</CODE> - a function transforming the current element. <DT><B>Returns:</B><DD>the aggregated measure.<DT><B>See Also:</B><DD><A HREF="../../../cern/jet/math/Functions.html" title="class in cern.jet.math"><CODE>Functions</CODE></A></DL> </DD> </DL> <HR> <A NAME="clear()"><!-- --></A><H3> clear</H3> <PRE> public void <B>clear</B>()</PRE> <DL> <DD>Removes all elements from the receiver. The receiver will be empty after this call returns. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/QuantileBin1D.html#clear()">clear</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/QuantileBin1D.html" title="class in hep.aida.bin">QuantileBin1D</A></CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="clone()"><!-- --></A><H3> clone</H3> <PRE> public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>clone</B>()</PRE> <DL> <DD>Returns a deep copy of the receiver. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/QuantileBin1D.html#clone()">clone</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/QuantileBin1D.html" title="class in hep.aida.bin">QuantileBin1D</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>a deep copy of the receiver.</DL> </DD> </DL> <HR> <A NAME="correlation(hep.aida.bin.DynamicBin1D)"><!-- --></A><H3> correlation</H3> <PRE> public double <B>correlation</B>(<A HREF="../../../hep/aida/bin/DynamicBin1D.html" title="class in hep.aida.bin">DynamicBin1D</A> other)</PRE> <DL> <DD>Returns the correlation of two bins, which is <tt>corr(x,y) = covariance(x,y) / (stdDev(x)*stdDev(y))</tt> (Pearson's correlation coefficient). A correlation coefficient varies between -1 (for a perfect negative relationship) to +1 (for a perfect positive relationship). See the <A HREF="http://www.cquest.utoronto.ca/geog/ggr270y/notes/not05efg.html"> math definition</A> and <A HREF="http://www.stat.berkeley.edu/users/stark/SticiGui/Text/gloss.htm#correlation_coef"> another def</A>. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>other</CODE> - the bin to compare with. <DT><B>Returns:</B><DD>the correlation. <DT><B>Throws:</B> <DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <tt>size() != other.size()</tt>.</DL> </DD> </DL> <HR> <A NAME="covariance(hep.aida.bin.DynamicBin1D)"><!-- --></A><H3> covariance</H3> <PRE> public double <B>covariance</B>(<A HREF="../../../hep/aida/bin/DynamicBin1D.html" title="class in hep.aida.bin">DynamicBin1D</A> other)</PRE> <DL> <DD>Returns the covariance of two bins, which is <tt>cov(x,y) = (1/size()) * Sum((x[i]-mean(x)) * (y[i]-mean(y)))</tt>. See the <A HREF="http://www.cquest.utoronto.ca/geog/ggr270y/notes/not05efg.html"> math definition</A>. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>other</CODE> - the bin to compare with. <DT><B>Returns:</B><DD>the covariance. <DT><B>Throws:</B> <DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <tt>size() != other.size()</tt>.</DL> </DD> </DL> <HR> <A NAME="elements()"><!-- --></A><H3> elements</H3> <PRE> public <A HREF="../../../cern/colt/list/DoubleArrayList.html" title="class in cern.colt.list">DoubleArrayList</A> <B>elements</B>()</PRE> <DL> <DD>Returns a copy of the currently stored elements. Concerning the order in which elements are returned, see <A HREF="../../../hep/aida/bin/DynamicBin1D.html#setFixedOrder(boolean)"><CODE>setFixedOrder(boolean)</CODE></A>. <P> <DD><DL> <DT><B>Returns:</B><DD>a copy of the currently stored elements.</DL> </DD> </DL> <HR> <A NAME="equals(java.lang.Object)"><!-- --></A><H3> equals</H3> <PRE> public boolean <B>equals</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> object)</PRE> <DL> <DD>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 and have the same elements, order being irrelevant (multiset equality). <p> Definition of <i>Equality</i> for multisets: A,B are equal <=> A is a superset of B and B is a superset of A. (Elements must occur the same number of times, order is irrelevant.) <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/AbstractBin1D.html#equals(java.lang.Object)">equals</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/AbstractBin1D.html" title="class in hep.aida.bin">AbstractBin1D</A></CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="frequencies(cern.colt.list.DoubleArrayList, cern.colt.list.IntArrayList)"><!-- --></A><H3> frequencies</H3> <PRE> public void <B>frequencies</B>(<A HREF="../../../cern/colt/list/DoubleArrayList.html" title="class in cern.colt.list">DoubleArrayList</A> distinctElements, <A HREF="../../../cern/colt/list/IntArrayList.html" title="class in cern.colt.list">IntArrayList</A> frequencies)</PRE> <DL> <DD>Computes the frequency (number of occurances, count) of each distinct element. After this call returns both <tt>distinctElements</tt> and <tt>frequencies</tt> have a new size (which is equal for both), which is the number of distinct elements currently contained. <p> Distinct elements are filled into <tt>distinctElements</tt>, starting at index 0. The frequency of each distinct element is filled into <tt>frequencies</tt>, starting at index 0. Further, both <tt>distinctElements</tt> and <tt>frequencies</tt> are sorted ascending by "element" (in sync, of course). As a result, the smallest distinct element (and its frequency) can be found at index 0, the second smallest distinct element (and its frequency) at index 1, ..., the largest distinct element (and its frequency) at index <tt>distinctElements.size()-1</tt>. <p> <b>Example:</b> <br> <tt>elements = (8,7,6,6,7) --> distinctElements = (6,7,8), frequencies = (2,2,1)</tt> <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>distinctElements</CODE> - a list to be filled with the distinct elements; can have any size.<DD><CODE>frequencies</CODE> - a list to be filled with the frequencies; can have any size; set this parameter to <tt>null</tt> to ignore it.</DL> </DD> </DL> <HR> <A NAME="getMaxOrderForSumOfPowers()"><!-- --></A><H3> getMaxOrderForSumOfPowers</H3> <PRE> public int <B>getMaxOrderForSumOfPowers</B>()</PRE> <DL> <DD>Returns <tt>Integer.MAX_VALUE</tt>, the maximum order <tt>k</tt> for which sums of powers are retrievable. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/MightyStaticBin1D.html#getMaxOrderForSumOfPowers()">getMaxOrderForSumOfPowers</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/MightyStaticBin1D.html" title="class in hep.aida.bin">MightyStaticBin1D</A></CODE></DL> </DD> <DD><DL> <DT><B>See Also:</B><DD><A HREF="../../../hep/aida/bin/MightyStaticBin1D.html#hasSumOfPowers(int)"><CODE>MightyStaticBin1D.hasSumOfPowers(int)</CODE></A>, <A HREF="../../../hep/aida/bin/DynamicBin1D.html#sumOfPowers(int)"><CODE>sumOfPowers(int)</CODE></A></DL> </DD> </DL> <HR> <A NAME="getMinOrderForSumOfPowers()"><!-- --></A><H3> getMinOrderForSumOfPowers</H3> <PRE> public int <B>getMinOrderForSumOfPowers</B>()</PRE> <DL> <DD>Returns <tt>Integer.MIN_VALUE</tt>, the minimum order <tt>k</tt> for which sums of powers are retrievable. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/MightyStaticBin1D.html#getMinOrderForSumOfPowers()">getMinOrderForSumOfPowers</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/MightyStaticBin1D.html" title="class in hep.aida.bin">MightyStaticBin1D</A></CODE></DL> </DD> <DD><DL> <DT><B>See Also:</B><DD><A HREF="../../../hep/aida/bin/MightyStaticBin1D.html#hasSumOfPowers(int)"><CODE>MightyStaticBin1D.hasSumOfPowers(int)</CODE></A>, <A HREF="../../../hep/aida/bin/DynamicBin1D.html#sumOfPowers(int)"><CODE>sumOfPowers(int)</CODE></A></DL> </DD> </DL> <HR> <A NAME="isRebinnable()"><!-- --></A><H3> isRebinnable</H3> <PRE> public boolean <B>isRebinnable</B>()</PRE> <DL> <DD>Returns <tt>true</tt>. Returns whether a client can obtain all elements added to the receiver. In other words, tells whether the receiver internally preserves all added elements. If the receiver is rebinnable, the elements can be obtained via <tt>elements()</tt> methods. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/StaticBin1D.html#isRebinnable()">isRebinnable</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/StaticBin1D.html" title="class in hep.aida.bin">StaticBin1D</A></CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="max()"><!-- --></A><H3> max</H3> <PRE> public double <B>max</B>()</PRE> <DL> <DD>Returns the maximum. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/StaticBin1D.html#max()">max</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/StaticBin1D.html" title="class in hep.aida.bin">StaticBin1D</A></CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="min()"><!-- --></A><H3> min</H3> <PRE> public double <B>min</B>()</PRE> <DL> <DD>Returns the minimum. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/StaticBin1D.html#min()">min</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/StaticBin1D.html" title="class in hep.aida.bin">StaticBin1D</A></CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="moment(int, double)"><!-- --></A><H3> moment</H3> <PRE> public double <B>moment</B>(int k, double c)</PRE> <DL> <DD>Returns the moment of <tt>k</tt>-th order with value <tt>c</tt>, which is <tt>Sum( (x[i]-c)<sup>k</sup> ) / size()</tt>. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/MightyStaticBin1D.html#moment(int, double)">moment</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/MightyStaticBin1D.html" title="class in hep.aida.bin">MightyStaticBin1D</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>k</CODE> - the order; any number - can be less than zero, zero or greater than zero.<DD><CODE>c</CODE> - any number. <DT><B>Returns:</B><DD><tt>Double.NaN</tt> if <tt>!hasSumOfPower(k)</tt>.</DL> </DD> </DL> <HR> <A NAME="quantile(double)"><!-- --></A><H3> quantile</H3> <PRE> public double <B>quantile</B>(double phi)</PRE> <DL> <DD>Returns the exact <tt>phi-</tt>quantile; that is, the smallest contained element <tt>elem</tt> for which holds that <tt>phi</tt> percent of elements are less than <tt>elem</tt>. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/QuantileBin1D.html#quantile(double)">quantile</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/QuantileBin1D.html" title="class in hep.aida.bin">QuantileBin1D</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>phi</CODE> - must satisfy <tt>0 < phi < 1</tt>. <DT><B>Returns:</B><DD>the phi quantile element.</DL> </DD> </DL> <HR> <A NAME="quantileInverse(double)"><!-- --></A><H3> quantileInverse</H3> <PRE> public double <B>quantileInverse</B>(double element)</PRE> <DL> <DD>Returns exactly how many percent of the elements contained in the receiver are <tt><= element</tt>. Does linear interpolation if the element is not contained but lies in between two contained elements. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/QuantileBin1D.html#quantileInverse(double)">quantileInverse</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/QuantileBin1D.html" title="class in hep.aida.bin">QuantileBin1D</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>element</CODE> - the element to search for. <DT><B>Returns:</B><DD>the exact percentage <tt>phi</tt> of elements <tt><= element</tt> (<tt>0.0 <= phi <= 1.0)</tt>.</DL> </DD> </DL> <HR> <A NAME="quantiles(cern.colt.list.DoubleArrayList)"><!-- --></A><H3> quantiles</H3> <PRE> public <A HREF="../../../cern/colt/list/DoubleArrayList.html" title="class in cern.colt.list">DoubleArrayList</A> <B>quantiles</B>(<A HREF="../../../cern/colt/list/DoubleArrayList.html" title="class in cern.colt.list">DoubleArrayList</A> percentages)</PRE> <DL> <DD>Returns the exact quantiles of the specified percentages. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/QuantileBin1D.html#quantiles(cern.colt.list.DoubleArrayList)">quantiles</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/QuantileBin1D.html" title="class in hep.aida.bin">QuantileBin1D</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>percentages</CODE> - the percentages for which quantiles are to be computed. Each percentage must be in the interval <tt>(0.0,1.0]</tt>. <tt>percentages</tt> must be sorted ascending. <DT><B>Returns:</B><DD>the exact quantiles.</DL> </DD> </DL> <HR> <A NAME="removeAllOf(cern.colt.list.DoubleArrayList)"><!-- --></A><H3> removeAllOf</H3> <PRE> public boolean <B>removeAllOf</B>(<A HREF="../../../cern/colt/list/DoubleArrayList.html" title="class in cern.colt.list">DoubleArrayList</A> list)</PRE> <DL> <DD>Removes from the receiver all elements that are contained in the specified list. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>list</CODE> - the elements to be removed. <DT><B>Returns:</B><DD><code>true</code> if the receiver changed as a result of the call.</DL> </DD> </DL> <HR> <A NAME="sample(int, boolean, cern.jet.random.engine.RandomEngine, cern.colt.buffer.DoubleBuffer)"><!-- --></A><H3> sample</H3> <PRE> public void <B>sample</B>(int n, boolean withReplacement, <A HREF="../../../cern/jet/random/engine/RandomEngine.html" title="class in cern.jet.random.engine">RandomEngine</A> randomGenerator, <A HREF="../../../cern/colt/buffer/DoubleBuffer.html" title="class in cern.colt.buffer">DoubleBuffer</A> buffer)</PRE> <DL> <DD>Uniformly samples (chooses) <tt>n</tt> random elements <i>with or without replacement</i> from the contained elements and adds them to the given buffer. If the buffer is connected to a bin, the effect is that the chosen elements are added to the bin connected to the buffer. Also see <A HREF="../../../hep/aida/bin/AbstractBin1D.html#buffered(int)"><CODE>buffered</CODE></A>. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>n</CODE> - the number of elements to choose.<DD><CODE>withReplacement</CODE> - <tt>true</tt> samples with replacement, otherwise samples without replacement.<DD><CODE>randomGenerator</CODE> - a random number generator. Set this parameter to <tt>null</tt> to use a default random number generator seeded with the current time.<DD><CODE>buffer</CODE> - the buffer to which chosen elements will be added. <DT><B>Throws:</B> <DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <tt>!withReplacement && n > size()</tt>.<DT><B>See Also:</B><DD><A HREF="../../../cern/jet/random/sampling/package-summary.html"><CODE>cern.jet.random.sampling</CODE></A></DL> </DD> </DL> <HR> <A NAME="sampleBootstrap(hep.aida.bin.DynamicBin1D, int, cern.jet.random.engine.RandomEngine, hep.aida.bin.BinBinFunction1D)"><!-- --></A><H3> sampleBootstrap</H3> <PRE> public <A HREF="../../../hep/aida/bin/DynamicBin1D.html" title="class in hep.aida.bin">DynamicBin1D</A> <B>sampleBootstrap</B>(<A HREF="../../../hep/aida/bin/DynamicBin1D.html" title="class in hep.aida.bin">DynamicBin1D</A> other, int resamples, <A HREF="../../../cern/jet/random/engine/RandomEngine.html" title="class in cern.jet.random.engine">RandomEngine</A> randomGenerator, <A HREF="../../../hep/aida/bin/BinBinFunction1D.html" title="interface in hep.aida.bin">BinBinFunction1D</A> function)</PRE> <DL> <DD>Generic bootstrap resampling. Quite optimized - Don't be afraid to try it. Executes <tt>resamples</tt> resampling steps. In each resampling step does the following: <ul> <li>Uniformly samples (chooses) <tt>size()</tt> random elements <i>with replacement</i> from <tt>this</tt> and fills them into an auxiliary bin <tt>b1</tt>. <li>Uniformly samples (chooses) <tt>other.size()</tt> random elements <i>with replacement</i> from <tt>other</tt> and fills them into another auxiliary bin <tt>b2</tt>. <li>Executes the comparison function <tt>function</tt> on both auxiliary bins (<tt>function.apply(b1,b2)</tt>) and adds the result of the function to an auxiliary bootstrap bin <tt>b3</tt>. </ul> <p>Finally returns the auxiliary bootstrap bin <tt>b3</tt> from which the measure of interest can be read off. </p> <p><b>Background:</b></p> <p>Also see a more <A HREF="http://garnet.acns.fsu.edu/~pkelly/bootstrap.html"> in-depth discussion</A> on bootstrapping and related randomization methods. The classical statistical test for comparing the means of two samples is the <i>t-test</i>. Unfortunately, this test assumes that the two samples each come from a normal distribution and that these distributions have the same standard deviation. Quite often, however, data has a distribution that is non-normal in many ways. In particular, distributions are often unsymmetric. For such data, the t-test may produce misleading results and should thus not be used. Sometimes asymmetric data can be transformed into normally distributed data by taking e.g. the logarithm and the t-test will then produce valid results, but this still requires postulation of a certain distribution underlying the data, which is often not warranted, because too little is known about the data composition.</p> <p><i>Bootstrap resampling of means differences</i> (and other differences) is a robust replacement for the t-test and does not require assumptions about the actual distribution of the data. The idea of bootstrapping is quite simple: simulation. The only assumption required is that the two samples <tt>a</tt> and <tt>b</tt> are representative for the underlying distribution with respect to the statistic that is being tested - this assumption is of course implicit in all statistical tests. We can now generate lots of further samples that correspond to the two given ones, by sampling <i>with replacement</i>. This process is called <i>resampling</i>. A resample can (and usually will) have a different mean than the original one and by drawing hundreds or thousands of such resamples <tt>a<sub>r</sub></tt> from <tt>a</tt> and <tt>b<sub>r</sub></tt> from <tt>b</tt> we can compute the so-called bootstrap distribution of all the differences "mean of <tt>a<sub>r</sub></tt> minus mean of <tt>b<sub>r</sub></tt>". That is, a bootstrap bin filled with the differences. Now we can compute, what fraction of these differences is, say, greater than zero. Let's assume we have computed 1000 resamples of both <tt>a</tt> and <tt>b</tt> and found that only <tt>8</tt> of the differences were greater than zero. Then <tt>8/1000</tt> or <tt>0.008</tt> is the p-value (probability) for the hypothesis that the mean of the distribution underlying <tt>a</tt> is actually larger than the mean of the distribution underlying <tt>b</tt>. From this bootstrap test, we can clearly reject the hypothesis.</p> <p>Instead of using means differences, we can also use other differences, for example, the median differences.</p> <p>Instead of p-values we can also read arbitrary confidence intervals from the bootstrap bin. For example, <tt>90%</tt> of all bootstrap differences are left of the value <tt>-3.5</tt>, hence a left <tt>90%</tt> confidence interval for the difference would be <tt>(3.5,infinity)</tt>; in other words: the difference is <tt>3.5</tt> or larger with probability <tt>0.9</tt>.</p> <p>Sometimes we would like to compare not only means and medians, but also the variability (spread) of two samples. The conventional method of doing this is the <i>F-test</i>, which compares the standard deviations. It is related to the t-test and, like the latter, assumes the two samples to come from a normal distribution. The F-test is very sensitive to data with deviations from normality. Instead we can again resort to more robust bootstrap resampling and compare a measure of spread, for example the inter-quartile range. This way we compute a <i>bootstrap resampling of inter-quartile range differences</i> in order to arrive at a test for inequality or variability. </p> <p> <b>Example:</b> <table> <td class="PRE"> <pre> // v1,v2 - the two samples to compare against each other double[] v1 = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 21, 22,23,24,25,26,27,28,29,30,31}; double[] v2 = {10,11,12,13,14,15,16,17,18,19, 20, 30,31,32,33,34,35,36,37,38,39}; hep.aida.bin.DynamicBin1D X = new hep.aida.bin.DynamicBin1D(); hep.aida.bin.DynamicBin1D Y = new hep.aida.bin.DynamicBin1D(); X.addAllOf(new cern.colt.list.DoubleArrayList(v1)); Y.addAllOf(new cern.colt.list.DoubleArrayList(v2)); cern.jet.random.engine.RandomEngine random = new cern.jet.random.engine.MersenneTwister(); // bootstrap resampling of differences of means: BinBinFunction1D diff = new BinBinFunction1D() { public double apply(DynamicBin1D x, DynamicBin1D y) {return x.mean() - y.mean();} }; // bootstrap resampling of differences of medians: BinBinFunction1D diff = new BinBinFunction1D() { public double apply(DynamicBin1D x, DynamicBin1D y) {return x.median() - y.median();} }; // bootstrap resampling of differences of inter-quartile ranges: BinBinFunction1D diff = new BinBinFunction1D() { public double apply(DynamicBin1D x, DynamicBin1D y) {return (x.quantile(0.75)-x.quantile(0.25)) - (y.quantile(0.75)-y.quantile(0.25)); } }; DynamicBin1D boot = X.sampleBootstrap(Y,1000,random,diff); cern.jet.math.Functions F = cern.jet.math.Functions.functions; System.out.println("p-value="+ (boot.aggregate(F.plus, F.greater(0)) / boot.size())); System.out.println("left 90% confidence interval = ("+boot.quantile(0.9) + ",infinity)"); --> // bootstrap resampling of differences of means: p-value=0.0080 left 90% confidence interval = (-3.571428571428573,infinity) // bootstrap resampling of differences of medians: p-value=0.36 left 90% confidence interval = (5.0,infinity) // bootstrap resampling of differences of inter-quartile ranges: p-value=0.5699 left 90% confidence interval = (5.0,infinity) </pre> </td> </table> <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>other</CODE> - the other bin to compare the receiver against.<DD><CODE>resamples</CODE> - the number of times resampling shall be done.<DD><CODE>randomGenerator</CODE> - a random number generator. Set this parameter to <tt>null</tt> to use a default random number generator seeded with the current time.<DD><CODE>function</CODE> - a difference function comparing two samples; takes as first argument a sample of <tt>this</tt> and as second argument a sample of <tt>other</tt>. <DT><B>Returns:</B><DD>a bootstrap bin holding the results of <tt>function</tt> of each resampling step.<DT><B>See Also:</B><DD><A HREF="../../../cern/colt/GenericPermuting.html#permutation(long, int)"><CODE>GenericPermuting.permutation(long,int)</CODE></A></DL> </DD> </DL> <HR> <A NAME="setFixedOrder(boolean)"><!-- --></A><H3> setFixedOrder</H3> <PRE> public void <B>setFixedOrder</B>(boolean fixedOrder)</PRE> <DL> <DD>Determines whether the receivers internally preserved elements may be reordered or not. <ul> <li><tt>fixedOrder==false</tt> allows the order in which elements are returned by method <tt>elements()</tt> to be different from the order in which elements are added. <li><tt>fixedOrder==true</tt> guarantees that under all circumstances the order in which elements are returned by method <tt>elements()</tt> is identical to the order in which elements are added. However, the latter consumes twice as much memory if operations involving sorting are requested. This option is usually only required if a 2-dimensional bin, formed by two 1-dimensional bins, needs to be rebinnable. </ul> <p> Naturally, if <tt>fixedOrder</tt> is set to <tt>true</tt> you should not already have added elements to the receiver; it should be empty. <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="size()"><!-- --></A><H3> size</H3> <PRE> public int <B>size</B>()</PRE> <DL> <DD>Returns the number of elements contained in the receiver. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/StaticBin1D.html#size()">size</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/StaticBin1D.html" title="class in hep.aida.bin">StaticBin1D</A></CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="sortedElements()"><!-- --></A><H3> sortedElements</H3> <PRE> public <A HREF="../../../cern/colt/list/DoubleArrayList.html" title="class in cern.colt.list">DoubleArrayList</A> <B>sortedElements</B>()</PRE> <DL> <DD>Returns a copy of the currently stored elements, sorted ascending. Concerning the memory required for operations involving sorting, see <A HREF="../../../hep/aida/bin/DynamicBin1D.html#setFixedOrder(boolean)"><CODE>setFixedOrder(boolean)</CODE></A>. <P> <DD><DL> <DT><B>Returns:</B><DD>a copy of the currently stored elements, sorted ascending.</DL> </DD> </DL> <HR> <A NAME="standardize(double, double)"><!-- --></A><H3> standardize</H3> <PRE> public void <B>standardize</B>(double mean, double standardDeviation)</PRE> <DL> <DD>Modifies the receiver to be standardized. Changes each element <tt>x[i]</tt> as follows: <tt>x[i] = (x[i]-mean)/standardDeviation</tt>. <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="sum()"><!-- --></A><H3> sum</H3> <PRE> public double <B>sum</B>()</PRE> <DL> <DD>Returns the sum of all elements, which is <tt>Sum( x[i] )</tt>. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/StaticBin1D.html#sum()">sum</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/StaticBin1D.html" title="class in hep.aida.bin">StaticBin1D</A></CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="sumOfInversions()"><!-- --></A><H3> sumOfInversions</H3> <PRE> public double <B>sumOfInversions</B>()</PRE> <DL> <DD>Returns the sum of inversions, which is <tt>Sum( 1 / x[i] )</tt>. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/MightyStaticBin1D.html#sumOfInversions()">sumOfInversions</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/MightyStaticBin1D.html" title="class in hep.aida.bin">MightyStaticBin1D</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the sum of inversions; <tt>Double.NaN</tt> if <tt>!hasSumOfInversions()</tt>.<DT><B>See Also:</B><DD><A HREF="../../../hep/aida/bin/MightyStaticBin1D.html#hasSumOfInversions()"><CODE>MightyStaticBin1D.hasSumOfInversions()</CODE></A></DL> </DD> </DL> <HR> <A NAME="sumOfLogarithms()"><!-- --></A><H3> sumOfLogarithms</H3> <PRE> public double <B>sumOfLogarithms</B>()</PRE> <DL> <DD>Returns the sum of logarithms, which is <tt>Sum( Log(x[i]) )</tt>. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/MightyStaticBin1D.html#sumOfLogarithms()">sumOfLogarithms</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/MightyStaticBin1D.html" title="class in hep.aida.bin">MightyStaticBin1D</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the sum of logarithms; <tt>Double.NaN</tt> if <tt>!hasSumOfLogarithms()</tt>.<DT><B>See Also:</B><DD><A HREF="../../../hep/aida/bin/MightyStaticBin1D.html#hasSumOfLogarithms()"><CODE>MightyStaticBin1D.hasSumOfLogarithms()</CODE></A></DL> </DD> </DL> <HR> <A NAME="sumOfPowers(int)"><!-- --></A><H3> sumOfPowers</H3> <PRE> public double <B>sumOfPowers</B>(int k)</PRE> <DL> <DD>Returns the <tt>k-th</tt> order sum of powers, which is <tt>Sum( x[i]<sup>k</sup> )</tt>. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/MightyStaticBin1D.html#sumOfPowers(int)">sumOfPowers</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/MightyStaticBin1D.html" title="class in hep.aida.bin">MightyStaticBin1D</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>k</CODE> - the order of the powers. <DT><B>Returns:</B><DD>the sum of powers.<DT><B>See Also:</B><DD><A HREF="../../../hep/aida/bin/MightyStaticBin1D.html#hasSumOfPowers(int)"><CODE>MightyStaticBin1D.hasSumOfPowers(int)</CODE></A></DL> </DD> </DL> <HR> <A NAME="sumOfSquares()"><!-- --></A><H3> sumOfSquares</H3> <PRE> public double <B>sumOfSquares</B>()</PRE> <DL> <DD>Returns the sum of squares, which is <tt>Sum( x[i] * x[i] )</tt>. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/StaticBin1D.html#sumOfSquares()">sumOfSquares</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/StaticBin1D.html" title="class in hep.aida.bin">StaticBin1D</A></CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="toString()"><!-- --></A><H3> toString</H3> <PRE> public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE> <DL> <DD>Returns a String representation of the receiver. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/QuantileBin1D.html#toString()">toString</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/QuantileBin1D.html" title="class in hep.aida.bin">QuantileBin1D</A></CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="trim(int, int)"><!-- --></A><H3> trim</H3> <PRE> public void <B>trim</B>(int s, int l)</PRE> <DL> <DD>Removes the <tt>s</tt> smallest and <tt>l</tt> largest elements from the receiver. The receivers size will be reduced by <tt>s + l</tt> elements. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>s</CODE> - the number of smallest elements to trim away (<tt>s >= 0</tt>).<DD><CODE>l</CODE> - the number of largest elements to trim away (<tt>l >= 0</tt>).</DL> </DD> </DL> <HR> <A NAME="trimmedMean(int, int)"><!-- --></A><H3> trimmedMean</H3> <PRE> public double <B>trimmedMean</B>(int s, int l)</PRE> <DL> <DD>Returns the trimmed mean. That is the mean of the data <i>if</i> the <tt>s</tt> smallest and <tt>l</tt> largest elements <i>would</i> be removed from the receiver (they are not removed). <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>s</CODE> - the number of smallest elements to trim away (<tt>s >= 0</tt>).<DD><CODE>l</CODE> - the number of largest elements to trim away (<tt>l >= 0</tt>). <DT><B>Returns:</B><DD>the trimmed mean.</DL> </DD> </DL> <HR> <A NAME="trimToSize()"><!-- --></A><H3> trimToSize</H3> <PRE> public void <B>trimToSize</B>()</PRE> <DL> <DD>Trims the capacity of the receiver to be the receiver's current size. (This has nothing to do with trimming away smallest and largest elements. The method name is used to be consistent with JDK practice.) <p> Releases any superfluos internal memory. An application can use this operation to minimize the storage of the receiver. Does not affect functionality. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../hep/aida/bin/AbstractBin1D.html#trimToSize()">trimToSize</A></CODE> in class <CODE><A HREF="../../../hep/aida/bin/AbstractBin1D.html" title="class in hep.aida.bin">AbstractBin1D</A></CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DynamicBin1D.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <b>Colt 1.2.0</b></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../hep/aida/bin/BinFunctions1D.html" title="class in hep.aida.bin"><B>PREV CLASS</B></A> <A HREF="../../../hep/aida/bin/MightyStaticBin1D.html" title="class in hep.aida.bin"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="DynamicBin1D.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#fields_inherited_from_class_cern.colt.PersistentObject">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> <font size=-1 >Jump to the <a target=_top href=http://dsd.lbl.gov/~hoschek/colt >Colt Homepage</a> </BODY> </HTML>