Vector.Bin<T>(Vector<T>, IntervalIndex<T>) Method

Sorts values into bins and returns the result as a categorical vector.

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public static CategoricalVector<Interval<T>> Bin<T>(
	this Vector<T> values,
	IntervalIndex<T> index
)
where T : Object, IComparable<T>

Parameters

values  Vector<T>
A vector.
index  IntervalIndex<T>
An interval index describing the bins.

Type Parameters

T
The type of the values to sort.

Return Value

CategoricalVector<Interval<T>>
A categorical vector containing the bin assignments.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also