ILNumerics Ultimate VS

ILMathreshapeT Method (BaseArrayT, Int64, NullableStorageOrders)

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

[ILNumerics Computing Engine]

Namespace:  ILNumerics
Assembly:  ILNumerics.Computing (in ILNumerics.Computing.dll) Version: 5.5.0.0 (5.5.7503.3146)
Syntax

public static RetArray<T> reshape<T>(
	BaseArray<T> A,
	long d0,
	Nullable<StorageOrders> order = null
)

Parameters

A
Type: ILNumericsBaseArrayT
Input array.
d0
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).

Type Parameters

T

Return Value

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

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 array A. 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 Computing Engine]

See Also

Reference

MathInternal.reshape``1(BaseArrayUMP, InArrayInt64, NullableStorageOrders)