Namespaces

Types in MathNet.Numerics.Statistics

Type Histogram

Namespace MathNet.Numerics.Statistics

A class which computes histograms of data.

Constructors

Methods

Properties

Public Constructors

Histogram()

Initializes a new instance of the Histogram class.

Histogram(IEnumerable<double> data, int nbuckets)

Constructs a Histogram with a specific number of equally sized buckets. The upper and lower bound of the histogram will be set to the smallest and largest datapoint.
Parameters
IEnumerable<double> data

The data sequence to build a histogram on.

int nbuckets

The number of buckets to use.

Histogram(IEnumerable<double> data, int nbuckets, double lower, double upper)

Constructs a Histogram with a specific number of equally sized buckets.
Parameters
IEnumerable<double> data

The data sequence to build a histogram on.

int nbuckets

The number of buckets to use.

double lower

The histogram lower bound.

double upper

The histogram upper bound.

Public Methods

void AddBucket(Bucket bucket)

Adds a Bucket to the Histogram.

void AddData(double d)

Add one data point to the histogram. If the datapoint falls outside the range of the histogram, the lowerbound or upperbound will automatically adapt.
Parameters
double d

The datapoint which we want to add.

void AddData(IEnumerable<double> data)

Add a sequence of data point to the histogram. If the datapoint falls outside the range of the histogram, the lowerbound or upperbound will automatically adapt.
Parameters
IEnumerable<double> data

The sequence of datapoints which we want to add.

bool Equals(object obj)

int GetBucketIndexOf(double v)

Returns the index in the Histogram of the Bucket that contains the value v.
Parameters
double v

The point to search the bucket index for.

Return
int

The index of the bucket containing the point.

Bucket GetBucketOf(double v)

Returns the Bucket that contains the value v.
Parameters
double v

The point to search the bucket for.

Return
Bucket

A copy of the bucket containing point v.

int GetHashCode()

Type GetType()

string ToString()

Prints the buckets contained in the Histogram.

Public Properties

int BucketCount get;

Gets the number of buckets.

double DataCount get;

Gets the total number of datapoints in the histogram.

Bucket Item get;

Gets the n 'th bucket.

double LowerBound get;

Returns the lower bound of the histogram.

double UpperBound get;

Returns the upper bound of the histogram.