Compute a histogram.
<p>
The output array consists of a set of vertical bars, each representing
a histogram bin. The height of the bar is the count of the number
of inputs that have been observed that fall within that bin.
The <i>n</i>-th bin represents values in the range
(<i>x</i> - <i>w</i>/2 + <i>o</i>, <i>x</i> + <i>w</i>/2 + <i>o</i>),
where <i>w</i> is the value of the <i>binWidth</i> parameter,
and <i>o</i> is the value of the <i>binOffset</i> parameter.
So for example, if <i>o = w/2</i>,
then each bin represents values from <i>nw</i> to
(<i>n</i> + 1)<i>w</i> for some integer <i>n</i>.
The default offset is 0.5, half the default bin width, which is 1.0.
<p>
This actor has a <i>legend</i> parameter,
which gives a comma-separated list of labels to attach to
each dataset. Normally, the number of elements in this list
should equal the number of input channels, although this
is not enforced.
Steve Neuendorffer
$Id: ComputeHistogram.java 70398 2014-10-22 23:44:32Z cxh $
Ptolemy II 4.0
Red (eal)
Red (cxh)
The input port of type double.
The input port of type array of integer.
The lowest value that will be recorded in the histogram.
This parameter has type double, with default value 0.0.
The highest value that will be recorded in the histogram.
This parameter has type double, with default value 1.0.
The number of bins.
This parameter has type int, with default value 10.
The number of tokens to compute the histogram for.
The parameter that determines the consumption rate of the input.