Categorical Vector<T>.With Categories<U> Method
Returns a new categorical vector that uses the specified
index to encode values.
Definition
Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
A new categorical vector with the same level indexes but newIndex as its category index.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
public CategoricalVector<U> WithCategories<U>(
IList<U> newIndex
)
Parameters
- newIndex IList<U>
- A list of values that make up the category index of the new vector.
Type Parameters
- U
- The element type of the new index.
Return Value
CategoricalVector<U>A new categorical vector with the same level indexes but newIndex as its category index.
Exceptions
Argument | newIndex is null. |
Dimension | The length of newIndex is not equal to the length of the vector's CategoryIndex. |