ICategorical Vector.With Categories<T> Method
Constructs a new categorical vector using
the specified category index.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
C#
A new vector with element type T that has the same level indexes as this vector and assigns them the values in newIndex.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
CategoricalVector<T> WithCategories<T>(
IList<T> newIndex
)
Parameters
- newIndex IList<T>
- The category index of the new categorical vector.
Type Parameters
- T
- The element type of the new vector.
Return Value
CategoricalVector<T>A new vector with element type T that has the same level indexes as this vector and assigns them the values in newIndex.
Exceptions
Dimension | The number of elements in newIndex is less than the number of categories in the vector's current index. |