NMath Reference Guide

## 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

Syntax

The Histogram type exposes the following members.

Constructors

Name | Description | |
---|---|---|

Histogram(DoubleVector) | Create a Histogram instance with the specified bin boundaries. | |

Histogram(Interval) | Constructs a Histogram instance with the specified bin intervals. | |

Histogram(Int32, DoubleVector) | Construct a Histogram instance with the specified number of equal-sized bins, initialized with the given data vector. | |

Histogram(Int32, Double) | Construct a Histogram instance with the specified number of equal-sized bins, initialized with the given data array. | |

Histogram(Int32, Double, Double) | Constructs a Histogram instance with the specified number of equal-sized bins spanning the specified maximum and mininum values. |

Properties

Name | Description | |
---|---|---|

Bins | Gets the bin boundaries of the histogram. | |

Counts | Gets the counts for each bin in the histogram. | |

NumBins | Gets the number of bins in the histogram. | |

NumLarger | Gets the number of data points that were larger than the largest bin boundary. | |

NumSmaller | Gets the number of data points that were smaller than the smallest bin boundary. | |

Total | Gets the total number of data points added to this histogram. |

Methods

Name | Description | |
---|---|---|

AddData(Double) | Updates the histogram bin count with the given data point. | |

AddData(Double) | Updates the histogram bin counts with the given array of data points. | |

AddData(DoubleVector) | Updates the histogram bin counts with the given vector of data points. | |

Bin(Double) | Returns which bin this value lies in. | |

Bin(Int32) | Returns the nth bin interval. | |

CDF(Double) | The portion of the data in the same bin as the value or below. | |

CDF(Int32) | The portion of the data in the same bin as the value or below. | |

Clone | Creates a deep copy of this histogram. | |

Count | Gets the bin count for the specifed bin. | |

PDF(Double) | The portion of the data in the same bin as the value. | |

PDF(Int32) | The portion of the data in this bin. | |

Reset | Resets all bin counts to zero. The number of bins and bin boundaries remain unchanged. | |

StemLeaf | Formats the contents of this histogram into a simple ASCII stem-leaf diagram. | |

ToString |
Returns a formatted string representation of this histogram.
(Overrides ObjectToString) |

See Also