datan

## Class Histogram

- java.lang.Object
- - datan.Histogram

-     public class Histogram
      extends java.lang.Object

  A class representing a histogram.
  Author:
    Siegmund Brandt.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Histogram(double x0, double delx, int nx)` Creates a histogram.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `enter(double xin)` Enters xin in the appropriate bin with weight 1.
    `void` | `enter(double xin, double weight)` Enters xin in the appropriate bin with a user-defined weight.
    `double` | `getBinSize()`
    `double[]` | `getContents()`
    `double` | `getContentsAt(int i)`
    `double` | `getLowerBoundary()`
    `int` | `getNumberOfBins()`
    `double` | `getTotalContents()`
    `void` | `setContentsAt(double in, int i)` Sets the contents of bin number i to the value in

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Histogram

          public Histogram(double x0,
                   double delx,
                   int nx)

      Creates a histogram.
      Parameters:
        `x0` - lower boundary of histogram
        `delx` - bin size
        `nx` - number of bins

  - ### Method Detail

    - #### enter

          public void enter(double xin,
                   double weight)

      Enters xin in the appropriate bin with a user-defined weight.

    - #### enter

          public void enter(double xin)

      Enters xin in the appropriate bin with weight 1.

    - #### getLowerBoundary

          public double getLowerBoundary()

      Returns:
        the lower boundary

    - #### getBinSize

          public double getBinSize()

      Returns:
        the bin size

    - #### getNumberOfBins

          public int getNumberOfBins()

      Returns:
        the number of bins

    - #### getContents

          public double[] getContents()

      Returns:
        the contents of all nx bins

    - #### getTotalContents

          public double getTotalContents()

      Returns:
        the sum of the contents of all nx bins

    - #### getContentsAt

          public double getContentsAt(int i)

      Returns:
        the contents of bin number i

    - #### setContentsAt

          public void setContentsAt(double in,
                           int i)

      Sets the contents of bin number i to the value in