IStorage 2D<T, TStorage2D>.Create Method
Definition
Namespace: Numerics.NET.Collections
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Overload List
Create( | Constructs a new storage array of the specified dimensions. |
Create(T[], Int32, Int32) | Creates an array over a segment in a regular array. |
Create(Int32, Int32, Boolean)
Constructs a new storage array of the specified dimensions.
TStorage2D Create(
int rowCount,
int columnCount,
bool initializeToZero
)
Parameters
- rowCount Int32
- The number of rows.
- columnCount Int32
- The number of columns.
- initializeToZero Boolean
- Specifies whether the array should be initialized to the zero value of type T.
Return Value
TStorage2DA new array of type TStorage2D.
Remarks
Use this method on an instance of the implementing type to create an array that can hold the specified number of rows and columns of data. All values are stored contiguously in column-major order.
The element type T may have a zero value that is different from its default value. For example, the default value for nullable integers is null. In this case, passing a value of true for initializeToZero ensures that the elements in the array are properly initialized to zero. When such an initialization is not necessary, then this step can be omitted by passing a value of false.
Create(T[], Int32, Int32)
Creates an array over a segment in a regular array.
TStorage2D Create(
T[] values,
int offset,
int leadingDimension
)
Parameters
- values T[]
- A regular array of elements of type T.
- offset Int32
- The offset into values of the first element of the new array.
- leadingDimension Int32
- The leading dimension of the new array.
Return Value
TStorage2DA new array of type TStorage2D.