Vector.Wrap As Lists<T> Method
Constructs a new list vector by wrapping a flattened array with a grouping without copying.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.2.0
C#
A ListVector<T> containing the specified lists.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.2.0
public static ListVector<T> WrapAsLists<T>(
T[] flat,
IGrouping grouping
)
Parameters
- flat T[]
- An array containing all elements in flattened form.
- grouping IGrouping
- A grouping that defines how to partition the flattened array into lists.
Type Parameters
- T
- The element type of the lists.
Return Value
ListVector<T>A ListVector<T> containing the specified lists.
Remarks
This method wraps the flattened array without copying. Changes to the array's elements will be reflected in the list vector and vice versa.
Exceptions
| Argument | flat or grouping is null. |