ComputeHistogram
ptolemy.actor.lib.ComputeHistogram

Compute a histogram.

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 n-th bin represents values in the range (x - w/2 + o, x + w/2 + o), where w is the value of the binWidth parameter, and o is the value of the binOffset parameter. So for example, if o = w/2, then each bin represents values from nw to (n + 1)w for some integer n. The default offset is 0.5, half the default bin width, which is 1.0.

This actor has a legend 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.

Author(s): Steve Neuendorffer
Version:$Id: ComputeHistogram.java,v 1.22 2005/07/08 19:55:57 cxh Exp $
Pt.Proposed Rating:Red (eal)
Pt.Accepted Rating:Red (cxh)


input
The input port of type double.

output
The input port of type array of integer.



minimumValue
The lowest value that will be recorded in the histogram. This parameter has type double, with default value 0.0.

maximumValue
The highest value that will be recorded in the histogram. This parameter has type double, with default value 1.0.

numberOfBins
The number of bins. This parameter has type int, with default value 10.

inputCount
The number of tokens to compute the histogram for.

input_tokenConsumptionRate
The parameter that determines the consumption rate of the input.