casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
casa::ArrayUtil_global_functions_reverseArray Struct Reference

Reverse the order of one or more axes of an array. More...

#include <ArrayUtil.h>

List of all members.

Public Member Functions

template<class T >
Array< T > reverseArray (const Array< T > &array, const IPosition &reversedAxes, Bool alwaysCopy=True)
template<class T >
Array< T > reverseArray (const Array< T > &array, uInt axis, Bool alwaysCopy=True)

Detailed Description

Reverse the order of one or more axes of an array.

Intended use:

Public interface

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25
Test programs:
tArrayUtil2

Synopsis

This function makes it possible to reverse one or more axes of an array by swapping around the elements of each axis. 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 means that its elements are reversed. Reversing axis 1 means that the

Example

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. Reversing axis 1 of a Matrix means that its columns are reversed.

Definition at line 223 of file ArrayUtil.h.


Member Function Documentation

template<class T >
Array<T> casa::ArrayUtil_global_functions_reverseArray::reverseArray ( const Array< T > &  array,
const IPosition reversedAxes,
Bool  alwaysCopy = True 
)
template<class T >
Array<T> casa::ArrayUtil_global_functions_reverseArray::reverseArray ( const Array< T > &  array,
uInt  axis,
Bool  alwaysCopy = True 
)

The documentation for this struct was generated from the following file: