ILNumerics Ultimate VS

ConcreteArrayT1, LocalT, InT, OutT, RetT, StorageTReshape Method (Int64, NullableStorageOrders)

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
Create reshaped, 1 dimensional version of this array. Flattens the array to a vector.

[ILNumerics Core Module]

Namespace:  ILNumerics.Core.Arrays
Assembly:  ILNumerics.Core (in ILNumerics.Core.dll) Version: (5.5.7503.3146)

public RetT Reshape(
	long d0,
	Nullable<StorageOrders> order = null


Type: SystemInt64
Length of the vector produced. This must be equal to NumberOfElements or a negative number.
order (Optional)
Type: SystemNullableStorageOrders
[Optional] Storage order for the new array. Default: null (DefaultStorageOrder).

Return Value

Type: RetT
A new array with the same values as this array, lined up in a 1-dimensional vector.

The (redundant) parameter d0 indicates the number of elements along the first dimension for the returned array. If d0 is positive, its value must equal the number of elements in this array. If d0 is negative, the correct number of elements is substituted automatically.

The setting of MinNumberOfArrayDimensions is taken into account. Therefore - by default - the array returned will have 2 dimensions, since the default value for MinNumberOfArrayDimensions is 2.

The storage order for both: the order for reading the elements from this array and storing the element into the reshaped array is determined as follows:

If order is specified (ColumnMajor or RowMajor) its value is used for the output. A copy is made only if really needed.Otherwise, the value of DefaultStorageOrder determins the target storage order.

A copy of the elements is required for non-continous arrays and - except for vector shaped arrays - for unmatching order settings. Otherwise the returned array references the same memory as this array with a modified size descriptor.

[ILNumerics Core Module]

See Also