Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.math.stat.descriptive.moment
Class VectorialMean

    java.lang.Object
      org.apache.commons.math.stat.descriptive.moment.VectorialMean

All Implemented Interfaces:
  java.io.Serializable

    public class VectorialMean

extends java.lang.Object
implements java.io.Serializable

Returns the arithmetic mean of the available vectors.

Since:
  1.2
Version:
  $Revision: 922714 $ $Date: 2010-03-13 20:35:14 -0500 (Sat, 13 Mar 2010) $
See Also:
  Serialized Form

Field Summary
`private Mean[]` | `means` Means for each component.
`private static long` | `serialVersionUID` Serializable version identifier

Constructor Summary
`VectorialMean(int dimension)` Constructs a VectorialMean.

Method Summary
`boolean` | `equals(java.lang.Object obj)`
`long` | `getN()` Get the number of vectors in the sample.
`double[]` | `getResult()` Get the mean vector.
`int` | `hashCode()`
`void` | `increment(double[] v)` Add a new vector to the sample.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### serialVersionUID

    private static final long serialVersionUID

  Serializable version identifier

  See Also:
    Constant Field Values

### means

    private final Mean[] means

  Means for each component.

Constructor Detail

### VectorialMean

    public VectorialMean(int dimension)

  Constructs a VectorialMean.

  Parameters:
    `dimension` - vectors dimension

Method Detail

### increment

    public void increment(double[] v)
                   throws DimensionMismatchException

  Add a new vector to the sample.

  Parameters:
    `v` - vector to add
  Throws:
    `DimensionMismatchException` - if the vector does not have the right dimension

### getResult

    public double[] getResult()

  Get the mean vector.

  Returns:
    mean vector

### getN

    public long getN()

  Get the number of vectors in the sample.

  Returns:
    number of vectors in the sample

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### equals

    public boolean equals(java.lang.Object obj)

  Overrides:
    `equals` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2003-2011 Apache Software Foundation