CHistogram:Class Description


The CHistogram class is used to compute the frequency distribution, or "histogram", of an array of values. This class provides methods for choosing the binning strategy and for computing the histogram.

Usage

Construction

Object = CHistogram:new()

Destruction

Object:delete()

Global Function

THist

Returns the histogram of an array. This function uses the CHistogram class internally but does not provide access to it.

Class Methods

Construction

new

Creates a new instance of a CHistogram object.

delete

Deletes the instance of the CHistogram object.

Operations

Calc

Calculates the histogram using current binning parameters.

SetBinWidth

Configures the histogram to prioritize the bin width.

SetBinCount

Configures the histogram to prioritize the number of bins.

SetBinAuto

Sets the binning to automatically compute binning parameters. This is the default.

SetCorrelated

Allows faster computation when the data are correlated rather than randomly ordered.

Auto Binning Methods

These methods return the actual binning values that were used for auto binning mode.

GetBinCount

The bin count that was used.

GetBinWidth

The bin width that was used.

GetMin

The minimum value used

GetMax

The maximum value used.

Related Topics

Script Classes

THist function

Table Functions