Sorts values into bins and returns the result as a categorical vector.
Namespace:
Extreme.Mathematics
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static CategoricalVector<Interval<T>> Bin<T>(
this Vector<T> values,
IntervalIndex<T> index
)
where T : Object, IComparable<T>
<ExtensionAttribute>
Public Shared Function Bin(Of T As {Object, IComparable(Of T)}) (
values As Vector(Of T),
index As IntervalIndex(Of T)
) As CategoricalVector(Of Interval(Of T))
public:
[ExtensionAttribute]
generic<typename T>
where T : Object, IComparable<T>
static CategoricalVector<Interval<T>>^ Bin(
Vector<T>^ values,
IntervalIndex<T>^ index
)
[<ExtensionAttribute>]
static member Bin :
values : Vector<'T> *
index : IntervalIndex<'T> -> CategoricalVector<Interval<'T>> when 'T : Object and IComparable<'T>
Parameters
- values
- Type: Extreme.MathematicsVectorT
A vector. - index
- Type: Extreme.DataAnalysisIntervalIndexT
An interval index describing the bins.
Type Parameters
- T
- The type of the values to sort.
Return Value
Type:
CategoricalVectorIntervalTA 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
VectorT. 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).
Reference