ICategoricalVector.WithCategories<T> Method

Constructs a new categorical vector using the specified category index.

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
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

DimensionMismatchExceptionThe number of elements in newIndex is less than the number of categories in the vector's current index.

See Also