Vector.Bin Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0
Overload List
Bin<T>(IVector, IntervalIndex<T>) | Sorts values into bins and returns the result as a categorical vector. |
Bin<T>(Vector<T>, IntervalIndex<T>) | Sorts values into bins and returns the result as a categorical vector. |
Bin<T>(IVector, IList<T>, SpecialBins) | Sorts values into bins and returns the result as a categorical vector. |
Bin<T>(Vector<T>, IList<T>, SpecialBins) | Sorts values into bins and returns the result as a categorical vector. |
Bin<T>(Vector<T>, Int32, SpecialBins) | Sorts values into bins and returns the result as a categorical vector. |
Bin<T>(IVector, IntervalIndex<T>)
Sorts values into bins and returns the result as a categorical vector.
public static CategoricalVector<Interval<T>> Bin<T>(
this IVector values,
IntervalIndex<T> index
)
where T : Object, IComparable<T>
Parameters
- values IVector
- 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 IVector. 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).Bin<T>(Vector<T>, IntervalIndex<T>)
Sorts values into bins and returns the result as a categorical vector.
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).Bin<T>(IVector, IList<T>, SpecialBins)
Sorts values into bins and returns the result as a categorical vector.
public static CategoricalVector<Interval<T>> Bin<T>(
this IVector values,
IList<T> bounds,
SpecialBins specialBins = SpecialBins.None
)
where T : Object, IComparable<T>
Parameters
- values IVector
- A vector.
- bounds IList<T>
- The number of intervals.
- specialBins SpecialBins (Optional)
- (Optional.) A SpecialBins value that specifies which special bins, if any, to include. The default is None.
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 IVector. 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).Remarks
The bins are evenly spaced between the smallest and the largest value in values.
Bin<T>(Vector<T>, IList<T>, SpecialBins)
Sorts values into bins and returns the result as a categorical vector.
public static CategoricalVector<Interval<T>> Bin<T>(
this Vector<T> values,
IList<T> bounds,
SpecialBins specialBins = SpecialBins.None
)
where T : Object, IComparable<T>
Parameters
- values Vector<T>
- A vector.
- bounds IList<T>
- The number of intervals.
- specialBins SpecialBins (Optional)
- (Optional.) A SpecialBins value that specifies which special bins, if any, to include. The default is None.
Type Parameters
- T
- The type of the values to sort.
Return Value
CategoricalVector<Interval<T>>A categorical vec tor 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).Remarks
The bins are evenly spaced between the smallest and the largest value in values.
Bin<T>(Vector<T>, Int32, SpecialBins)
Sorts values into bins and returns the result as a categorical vector.
public static CategoricalVector<Interval<T>> Bin<T>(
this Vector<T> values,
int numberOfBins,
SpecialBins specialBins = SpecialBins.None
)
where T : Object, IComparable<T>
Parameters
- values Vector<T>
- A vector.
- numberOfBins Int32
- The number of intervals.
- specialBins SpecialBins (Optional)
- (Optional.) A SpecialBins value that specifies which special bins, if any, to include. The default is None.
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).Remarks
The bins are evenly spaced between the smallest and the largest value in values.