| 
 | SSJ V. labo. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectumontreal.iro.lecuyer.stat.list.ListOfStatProbes<E>
umontreal.iro.lecuyer.stat.list.ListOfFunctionOfMultipleMeansTallies<E>
public class ListOfFunctionOfMultipleMeansTallies<E extends FunctionOfMultipleMeansTally>
Represents a list of tally statistical collectors
 for a vector of functions of multiple means.
 Each element of such a list is an instance of 
 FunctionOfMultipleMeansTally,
 and observations can be added with
 the add method.
 This class defines a factory method to construct a list of tallies
 computing the same function and sharing the same dimension.
| Constructor Summary | |
|---|---|
| ListOfFunctionOfMultipleMeansTallies()Constructs a new empty list of tallies. | |
| ListOfFunctionOfMultipleMeansTallies(String name)Constructs a new empty list of tallies with name name. | |
| Method Summary | |
|---|---|
|  void | add(double[][] x)For each tally i in this list, adds the vector x[i]. | 
|  void | add(DoubleMatrix2D x)Equivalent to add(x.toArray()),
  without copying the elements of x into a temporary 2D array. | 
|  void | addSameDimension(double[]... x)For each element i of this list of tallies, adds the vector of observations x[0][i], ..., x[d-1][i]. | 
|  void | addSameDimension(DoubleMatrix1D... x)Equivalent to addSameDimensionx.toArray(),
    without copying the elements of x into a temporary 1D array. | 
|  boolean | areAllNumberObsEqual()Tests that every tally in this list contains the same number of observations. | 
|  void | average(double[] a)Computes the function of averages for each tally in this list. | 
|  ListOfFunctionOfMultipleMeansTallies<E> | clone()Clones this object. | 
| static ListOfFunctionOfMultipleMeansTallies<FunctionOfMultipleMeansTally> | create(MultivariateFunction func,
       int d,
       int size)This factory method constructs and returns a list of tallies with size instances of FunctionOfMultipleMeansTally. | 
|  int | getDimension()Assuming that each tally in this list has the same dimension, returns the dimension of tally 0, or 0 if this list is empty. | 
|  int | numberObs()Assuming that each tally in this list contains the same number of observations, returns the number of observations in tally 0, or 0 if this list is empty. | 
|  void | standardDeviation(double[] v)For each tally in this list, computes the standard deviation, and stores it into v. | 
|  void | variance(double[] v)For each tally in this list, computes the sample variance and stores it into v. | 
| Methods inherited from class umontreal.iro.lecuyer.stat.list.ListOfStatProbes | 
|---|
| add, add, addAll, addAll, addArrayOfObservationListener, clear, clearArrayOfObservationListeners, contains, containsAll, equals, get, getName, hashCode, indexOf, init, isBroadcasting, isCollecting, isEmpty, isModifiable, iterator, lastIndexOf, listIterator, listIterator, notifyListeners, remove, remove, removeAll, removeArrayOfObservationListener, report, retainAll, set, setBroadcasting, setCollecting, setName, setUnmodifiable, size, subList, sum, toArray, toArray | 
| Methods inherited from class java.lang.Object | 
|---|
| getClass, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public ListOfFunctionOfMultipleMeansTallies()
public ListOfFunctionOfMultipleMeansTallies(String name)
name - the name of this list.| Method Detail | 
|---|
public static ListOfFunctionOfMultipleMeansTallies<FunctionOfMultipleMeansTally> create(MultivariateFunction func,
                                                                                        int d,
                                                                                        int size)
FunctionOfMultipleMeansTally.
    Each tally computes the multivariate function func, in
    d dimensions.
func - the multivariate function computed by the tallies.d - the dimension of the tallies.size - the size of the list.
public void add(double[][] x)
x - the array of vectors of observations being added.
IllegalArgumentException - if the length of x
     does not correspond to size(), or the length of
     x[i] does not correspond to the dimension of
     the underlying tally i, for at least one i.public void add(DoubleMatrix2D x)
add (x.toArray()),
  without copying the elements of x into a temporary 2D array.
  This can be used only when all the function of multiple means tallies
  in this list share the same dimension.
x - the matrix of observations being added, each
     row corresponding to a vector added to a tally.
IllegalArgumentException - if the number of rows in x
     does not correspond to size(), or the number of columns
     does not correspond to the dimension of
     the underlying tallies.public void addSameDimension(double[]... x)
add, and calls the latter method with this array.
    For example, let lt be a list of tallies whose l
    elements correspond to ratios. If a program can generate two arrays
    num and den of length l representing
    observations for the numerator and denominator of the ratios,
    respectively, the observations can be added using
    lt.add (num, den) instead of creating an intermediate
    matrix of observations.
x - the 2D array of observations.
IllegalArgumentException - if the length of x does not
          correspond to the dimension of the tally, or the length of the arrays
          x[j] are not equal for all j=0,...,d-1.public void addSameDimension(DoubleMatrix1D... x)
addSameDimension x.toArray(),
    without copying the elements of x into a temporary 1D array.
    This can be used only when all the function of multiple means tallies
    in this list share the same dimension.
public int getDimension()
public int numberObs()
public boolean areAllNumberObsEqual()
public void average(double[] a)
average in class ListOfStatProbes<E extends FunctionOfMultipleMeansTally>a - the array to be filled with averages.public void variance(double[] v)
v - the array to be filled with sample variances.
NullPointerException - if v is null.
IllegalArgumentException - if v.length
     does not correspond to size.public void standardDeviation(double[] v)
variance and
  performing a square root on every element
  of the filled array.
v - the array to be filled with standard deviations.
NullPointerException - if v is null.
IllegalArgumentException - if v.length
     does not correspond to size().public ListOfFunctionOfMultipleMeansTallies<E> clone()
clone in class ListOfStatProbes<E extends FunctionOfMultipleMeansTally>| 
 | SSJ V. labo. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||