casacore
|
Reverse the order of one or more axes of an MArray. More...
#include <MArrayUtil.h>
Public Member Functions | |
template<class T > | |
MArray< T > | reverseArray (const MArray< T > &array, const IPosition &reversedAxes, Bool alwaysCopy=True) |
Reverse the order of one or more axes of an MArray.
Public interface
This function makes it possible to reverse one or more axes of an MArray by swapping around the elements of each axis. Both the data and the optional mask are reversed. The resulting array is a copy of the input array with its data moved around according to the new 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.
Reversing axis 0 of a Vector means that the Vector is reversed. Reversing axis 1 of a Matrix means that its rows are reversed. Reversing axis 0 of an N-dim array means that the elements of each Vector in that array are reversed.
Definition at line 117 of file MArrayUtil.h.
|
inline |
Definition at line 119 of file MArrayUtil.h.
References casacore::array(), and casacore::TableExprNode::isNull().