#include <ArrayUtil.h>
Part of API
This function makes it possible to reorder the axes of an array. The resulting array is a copy of the input array with its data moved around according to the new array order. If the order does not change, a copy is returned if the alwaysCopy is true. Otherwise a reference of the input array is returned.
The newAxisOrder defines the new axes order. Its length can be less than the dimensionality of the input array. It is appended with the non-specified axes in their natural order. newAxisOrder(i) gives the axis in the original array which will now get axis i.
Array<Int> result = reorderArray (someArray, IPosition(2,1,3));
This function was needed for an efficient implementation of the functions partialMedians and partialFractiles.
Definition at line 216 of file ArrayUtil.h.
Public Member Functions | |
| template<class T> | |
| Array< T > | reorderArray (const Array< T > &array, const IPosition &newAxisOrder, Bool alwaysCopy=True) |
| Array<T> casa::ArrayUtil_global_functions_reorderArray::reorderArray | ( | const Array< T > & | array, | |
| const IPosition & | newAxisOrder, | |||
| Bool | alwaysCopy = True | |||
| ) |
1.5.1