Namespaces

Types in MathNet.Numerics.Statistics

Type Bucket

Namespace MathNet.Numerics.Statistics

Interfaces IComparable<Bucket>, ICloneable

A Histogram consists of a series of Bucket s, each representing a region limited by a lower bound (exclusive) and an upper bound (inclusive).
This type declares a DataContract for out of the box ephemeral serialization with engines like DataContractSerializer, Protocol Buffers and FsPickler, but does not guarantee any compatibility between versions. It is not recommended to rely on this mechanism for durable persistence.

Constructors

Methods

Properties

Public Constructors

Bucket(double lowerBound, double upperBound, double count)

Initializes a new instance of the Bucket class.

Bucket(double targetValue)

Constructs a Bucket that can be used as an argument for a IComparer`1 like DefaultPointComparer when performing a Binary search.
Parameters
double targetValue

Value to look for

Public Methods

object Clone()

Creates a copy of the Bucket with the lowerbound, upperbound and counts exactly equal.
Return
object

A cloned Bucket object.

int CompareTo(Bucket bucket)

Comparison of two disjoint buckets. The buckets cannot be overlapping.
Return
int

0 if UpperBound and LowerBound are bit-for-bit equal 1 if This bucket is lower that the compared bucket -1 otherwise

int Contains(double x)

This method check whether a point is contained within this bucket.
Parameters
double x

The point to check.

Return
int

0 if the point falls within the bucket boundaries; -1 if the point is smaller than the bucket, +1 if the point is larger than the bucket.

bool Equals(object obj)

Checks whether two Buckets are equal.
UpperBound and LowerBound are compared bit-for-bit, but This method tolerates a difference in Count given by .

int GetHashCode()

Provides a hash code for this bucket.

Type GetType()

string ToString()

Formats a human-readable string for this bucket.

Public Properties

double Count get; set;

The number of datapoints in the bucket.
Value may be NaN if this was constructed as a IComparer`1 argument.

IComparer<Bucket> DefaultPointComparer get;

Default comparer.

double LowerBound get; set;

Lower Bound of the Bucket.

double UpperBound get; set;

Upper Bound of the Bucket.

double Width get;

Width of the Bucket.