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

## org.jini.rio.watch
Class Accumulator

    java.lang.Object
      org.jini.rio.watch.Accumulator

    public class Accumulator

extends Object

The Accumulator represents a collection of Calculable objects and performs statistical analysis across the collection of Calculable objects, providing mean, median and standard deviation

Constructor Summary
`Accumulator(WatchDataSource source)` Creates new Accumulator

Method Summary
`int` | `count()` Get the count of the current set of values
`int` | `count(int offset, int range)` Get the count of set of values for the specified offset and range
`Calculable[]` | `getCalcs()`
`WatchDataSource` | `getSource()` Getter for property source.
`void` | `init(int offset, int length)` Initialize the range of values for calculating statistics
`double` | `max()` Get the max value of the current set of values
`double` | `max(int offset, int range)` Get the max value for the specified offset and range
`double` | `mean()` Get the mean of the current set of values
`double` | `mean(int offset, int range)` Get the mean of the set of values for the specified offset and range
`double` | `median()` Get the median of the current set of values
`double` | `median(int offset, int range)` Get the median of the set of values for the specified offset and range
`double` | `min()` Get the min of the current set of values
`double` | `min(int offset, int range)` Get the min of the set of values for the specified offset and range
`double` | `mode()` Get the mode of the current set of values
`double` | `mode(int offset, int range)` Get the mode of the set of values for the specified offset and range
`int` | `modeCount()` Get the number of occurrences of the mode in the current set of values
`int` | `modeCount(int offset, int range)` Get the number of occurrences of the mode in the set of values for the specified offset and range
`double` | `range()` Get the range of the current set of values
`double` | `range(int offset, int range)` Get the Range of the set of values for the specified offset and range
`void` | `reset()` Clears the current set of values
`void` | `setSource(WatchDataSource source)` Setter for property source.
`double` | `standardDeviation()` Get the standard deviation of the current set of values
`double` | `standardDeviation(int offset, int range)` Get the standard deviation of the set of values for the specified offset and range
`double` | `sum()` Get the sum of the current set of values
`double` | `sum(int offset, int range)` Get the sum of the set of values for the specified offset and range

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

Constructor Detail

### Accumulator

    public Accumulator(WatchDataSource source)

  Creates new Accumulator

  Parameters:
    `source` - The WatchDataSource the Accumulator will use

Method Detail

### getCalcs

    public Calculable[] getCalcs()

### reset

    public void reset()

  Clears the current set of values

### init

    public void init(int offset,
                     int length)
              throws RemoteException

  Initialize the range of values for calculating statistics

  Parameters:
    `offset` - the index starting point
    `length` - the number of values
  Throws:
    `RemoteException` - If communication errors happen interfacing with the WatchDataSource

### count

    public int count()

  Get the count of the current set of values

  Returns:
    int the total number of values

### count

    public int count(int offset,
                     int range)
              throws RemoteException

  Get the count of set of values for the specified offset and range

  Parameters:
    `offset` - int index of starting value
    `range` - int number of values
  Returns:
    int the total number of values
  Throws:
    `RemoteException` - If communication errors happen interfacing with the WatchDataSource

### max

    public double max()

  Get the max value of the current set of values

  Returns:
    double the max of values

### max

    public double max(int offset,
                      int range)
               throws RemoteException

  Get the max value for the specified offset and range

  Parameters:
    `offset` - int index of starting value
    `range` - int number of values
  Returns:
    double the max value
  Throws:
    `RemoteException` - If communication errors happen interfacing with the WatchDataSource

### mean

    public double mean()

  Get the mean of the current set of values

  Returns:
    double the mean of the values

### mean

    public double mean(int offset,
                       int range)
                throws RemoteException

  Get the mean of the set of values for the specified offset and range

  Parameters:
    `offset` - int index of starting value
    `range` - int number of values
  Returns:
    double the mean of the values
  Throws:
    `RemoteException` - If communication errors happen interfacing with the WatchDataSource

### median

    public double median()

  Get the median of the current set of values

  Returns:
    double the median of the values

### median

    public double median(int offset,
                         int range)
                  throws RemoteException

  Get the median of the set of values for the specified offset and range

  Parameters:
    `offset` - int index of starting value
    `range` - int number of values
  Returns:
    double the median of the values
  Throws:
    `RemoteException` - If communication errors happen interfacing with the WatchDataSource

### min

    public double min()

  Get the min of the current set of values

  Returns:
    double the min of the values

### min

    public double min(int offset,
                      int range)
               throws RemoteException

  Get the min of the set of values for the specified offset and range

  Parameters:
    `offset` - int index of starting value
    `range` - int number of values
  Returns:
    double the min of the values
  Throws:
    `RemoteException` - If communication errors happen interfacing with the WatchDataSource

### mode

    public double mode()

  Get the mode of the current set of values

  Returns:
    double the mode of the values

### mode

    public double mode(int offset,
                       int range)
                throws RemoteException

  Get the mode of the set of values for the specified offset and range

  Parameters:
    `offset` - int index of starting value
    `range` - int number of values
  Returns:
    double the mode of the values
  Throws:
    `RemoteException` - If communication errors happen interfacing with the WatchDataSource

### modeCount

    public int modeCount()

  Get the number of occurrences of the mode in the current set of values

  Returns:
    int the mode count

### modeCount

    public int modeCount(int offset,
                         int range)
                  throws RemoteException

  Get the number of occurrences of the mode in the set of values for the specified offset and range

  Parameters:
    `offset` - int index of starting value
    `range` - int number of values
  Returns:
    int the mode count
  Throws:
    `RemoteException` - If communication errors happen interfacing with the WatchDataSource

### range

    public double range()

  Get the range of the current set of values

  Returns:
    double the range of the values

### range

    public double range(int offset,
                        int range)
                 throws RemoteException

  Get the Range of the set of values for the specified offset and range

  Parameters:
    `offset` - int index of starting value
    `range` - int number of values
  Returns:
    double the Range of the values
  Throws:
    `RemoteException` - If communication errors happen interfacing with the WatchDataSource

### standardDeviation

    public double standardDeviation()

  Get the standard deviation of the current set of values

  Returns:
    double the standard deviation of the values

### standardDeviation

    public double standardDeviation(int offset,
                                    int range)
                             throws RemoteException

  Get the standard deviation of the set of values for the specified offset and range

  Parameters:
    `offset` - int index of starting value
    `range` - int number of values
  Returns:
    double the standard deviation of the values
  Throws:
    `RemoteException` - If communication errors happen interfacing with the WatchDataSource

### sum

    public double sum()

  Get the sum of the current set of values

  Returns:
    double the sum of the values

### sum

    public double sum(int offset,
                      int range)
               throws RemoteException

  Get the sum of the set of values for the specified offset and range

  Parameters:
    `offset` - int index of starting value
    `range` - int number of values
  Returns:
    double the sum of the values
  Throws:
    `RemoteException` - If communication errors happen interfacing with the WatchDataSource

### getSource

    public WatchDataSource getSource()

  Getter for property source.

  Returns:
    Value of property source.

### setSource

    public void setSource(WatchDataSource source)

  Setter for property source.

  Parameters:
    `source` - New value of property source.

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

Copyright © Project Rio.