Bin<T extends num?> class Binning data

A bin generator for numerical data.

Binning groups discrete samples into a smaller number of consecutive, non-overlapping intervals. They are often used to visualize the distribution of numerical data as histograms.

To bin the objects based on some property, use BinBy.

Inheritance

Constructors

Bin()
Constructs a new bin generator with the default settings.

Properties

domain ↔ (num?, num?) Function(Iterable<T>)
Returns the domain of visible values for a given list of data samples when bins are generated.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
thresholds Object Function(Iterable<T>, num, num)
Returns a list of bin thresholds or count indicating the boundaries between bins for a given list of data samples and the domain (min, max).
getter/setter pairinherited
value ↔ T Function(T)
A function that is invoked for each element in the input data list when the bins are generated.
getter/setter pairinherited

Methods

call(Iterable<T> data, [void handleBounds(List<(num, num)>)?]) List<List<T>>
Bins the given iterable of data samples into separate groups (bins), based on their values or properties.
inherited
constDomain((num?, num?) domain) → void
A special setter that defines a constant Bin.domain generator given the specified domain.
inherited
constThresholds(Object thresholds) → void
A special setter that defines a constant Bin.thresholds generator given the specified thresholds.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
withBounds(Iterable<T> data) → (List<List<T>>, List<(num, num)>)
Equivalent to the call function but additionally returns the computed bin bounds.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited