Class ComputeHistogram

  • All Implemented Interfaces:
    java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class ComputeHistogram
    extends TypedAtomicActor
    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.

    Since:
    Ptolemy II 4.0
    Version:
    $Id$
    Author:
    Steve Neuendorffer
    See Also:
    Histogram
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (eal)
    • Field Detail

      • minimumValue

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

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

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

        public PortParameter inputCount
        The number of tokens to compute the histogram for.
      • input_tokenConsumptionRate

        public Parameter input_tokenConsumptionRate
        The parameter that determines the consumption rate of the input.
      • input

        public TypedIOPort input
        The input port of type double.
      • output

        public TypedIOPort output
        The input port of type array of integer.