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 Statistics

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

    public class Statistics

extends Object

Class Statistics implements basic statistical formulae.

Constructor Summary
`Statistics()` no arg constructor
`Statistics(Iterable<Double> values)` Construct a new Statistics

Method Summary
`void` | `addValue(double d)`
`void` | `addValue(Double double1)`
`void` | `clearAll()` Removes all of the values in the internal collection.
`int` | `count()` Number of values in collection of values
`Vector` | `getValues()`
`double` | `max()` Get largest value in collection of values
`double` | `mean()` Get the average value in the collection of values
`double` | `median()` Get the median in the collection of values
`double` | `min()` Get smallest value in collection of values
`double` | `mode()` Get the mode
`int` | `modeOccurrenceCount()` Get the occurrences of the mode
`double` | `range()` Get the range
`void` | `removeValue(int location)`
`void` | `removeValues(double d, boolean removeAll)` Remove value
`void` | `removeValues(Double double1, boolean removeAll)` Remove value
`void` | `removeValues(double low, double high)` Remove values with a value between double1 and double2
`void` | `removeValues(Double low, Double high)` Remove values with a value between double1 and double2
`void` | `setValues(Calculable[] calcs)`
`void` | `setValues(Iterable<Double> vals)`
`double` | `standardDeviation()` Get the standard deviation
`double` | `sum()` Get the sum of all values

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

Constructor Detail

### Statistics

    public Statistics()

  no arg constructor

### Statistics

    public Statistics(Iterable<Double> values)

  Construct a new Statistics

  Parameters:
    `values` - initial values for new instance

Method Detail

### clearAll

    public void clearAll()

  Removes all of the values in the internal collection.

### count

    public int count()

  Number of values in collection of values

  Returns:
    int number of values

### max

    public double max()

  Get largest value in collection of values

  Returns:
    double largest value

### min

    public double min()

  Get smallest value in collection of values

  Returns:
    double smallest value

### mean

    public double mean()

  Get the average value in the collection of values

  Returns:
    double the average value in collection

### median

    public double median()

  Get the median in the collection of values

  Returns:
    double the middle value in the collection of values

### mode

    public double mode()

  Get the mode

  Returns:
    double the value with the highest number of occurences

### modeOccurrenceCount

    public int modeOccurrenceCount()

  Get the occurrences of the mode

  Returns:
    int count of the value with the highest number of occurences

### range

    public double range()

  Get the range

  Returns:
    double the difference between the min and max

### standardDeviation

    public double standardDeviation()

  Get the standard deviation

  Returns:
    double the dispersion from the mean

### getValues

    public Vector getValues()

### addValue

    public void addValue(Double double1)

### addValue

    public void addValue(double d)

### setValues

    public void setValues(Iterable<Double> vals)

### setValues

    public void setValues(Calculable[] calcs)

### removeValues

    public void removeValues(double d,
                             boolean removeAll)

  Remove value

  Parameters:
    `d` - the double to remove
    `removeAll` - false remove first occurrence; true remove all

### removeValues

    public void removeValues(Double double1,
                             boolean removeAll)

  Remove value

  Parameters:
    `double1` - the Double to remove
    `removeAll` - false remove first occurrence; true remove all

### removeValue

    public void removeValue(int location)

### removeValues

    public void removeValues(Double low,
                             Double high)

  Remove values with a value between double1 and double2

  Parameters:
    `low` - the lowest value to remove
    `high` - the highest value to remove

### removeValues

    public void removeValues(double low,
                             double high)

  Remove values with a value between double1 and double2

  Parameters:
    `low` - the lowest value to remove
    `high` - the highest value to remove

### sum

    public double sum()

  Get the sum of all values

  Returns:
    double the sum of all values

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.