Click or drag to resize

Histogram Class

Class Histogram constructs and maintains a histogram of input data. Input data is sorted into bins and a count is kept of how many data points fall into each bin.
Inheritance Hierarchy
SystemObject
  CenterSpace.NMath.CoreHistogram

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
[SerializableAttribute]
public class Histogram : ICloneable

The Histogram type exposes the following members.

Constructors
 NameDescription
Public methodHistogram(DoubleVector) Create a Histogram instance with the specified bin boundaries.
Public methodHistogram(Interval) Constructs a Histogram instance with the specified bin intervals.
Public methodHistogram(Int32, DoubleVector) Construct a Histogram instance with the specified number of equal-sized bins, initialized with the given data vector.
Public methodHistogram(Int32, Double) Construct a Histogram instance with the specified number of equal-sized bins, initialized with the given data array.
Public methodHistogram(Int32, Double, Double) Constructs a Histogram instance with the specified number of equal-sized bins spanning the specified maximum and mininum values.
Top
Properties
 NameDescription
Public propertyBins Gets the bin boundaries of the histogram.
Public propertyCounts Gets the counts for each bin in the histogram.
Public propertyNumBins Gets the number of bins in the histogram.
Public propertyNumLarger Gets the number of data points that were larger than the largest bin boundary.
Public propertyNumSmaller Gets the number of data points that were smaller than the smallest bin boundary.
Public propertyTotal Gets the total number of data points added to this histogram.
Top
Methods
 NameDescription
Public methodAddData(Double) Updates the histogram bin count with the given data point.
Public methodAddData(Double) Updates the histogram bin counts with the given array of data points.
Public methodAddData(DoubleVector) Updates the histogram bin counts with the given vector of data points.
Public methodBin(Double) Returns which bin this value lies in.
Public methodBin(Int32) Returns the nth bin interval.
Public methodCDF(Double) The portion of the data in the same bin as the value or below.
Public methodCDF(Int32) The portion of the data in the same bin as the value or below.
Public methodClone Creates a deep copy of this histogram.
Public methodCount Gets the bin count for the specifed bin.
Public methodPDF(Double) The portion of the data in the same bin as the value.
Public methodPDF(Int32) The portion of the data in this bin.
Public methodReset Resets all bin counts to zero. The number of bins and bin boundaries remain unchanged.
Public methodStemLeaf Formats the contents of this histogram into a simple ASCII stem-leaf diagram.
Public methodToString Returns a formatted string representation of this histogram.
(Overrides ObjectToString)
Top
See Also