casa
5.7.0-16
|
Indexing functions for IPosition's Convert between IPosition and offset in an array. More...
#include <IPosition.h>
Public Member Functions | |
IPosition | toIPositionInArray (Int64 offset, const IPosition &shape) |
Convert from offset to IPosition in an array. More... | |
Int64 | toOffsetInArray (const IPosition &iposition, const IPosition &shape) |
Convert from IPosition to offset in an array. More... | |
Bool | isInsideArray (const Int64 offset, const IPosition &shape) |
Determine if the given offset or IPosition is inside the array. More... | |
Bool | isInsideArray (const IPosition &iposition, const IPosition &shape) |
Indexing functions for IPosition's Convert between IPosition and offset in an array.
The offset of an element in an array is the number of elements from the origin that the element would be if the array were arranged linearly. The origin of the array has an offset equal to 0, while the "top right corner" of the array has an offset equal to one less than the total number of elements in the array.
Two examples of offset would be the index in a carray and the seek position in a file.
Definition at line 513 of file IPosition.h.
Bool casacore::IPosition_global_functions_IPosition_Indexing::isInsideArray | ( | const Int64 | offset, |
const IPosition & | shape | ||
) |
Determine if the given offset or IPosition is inside the array.
Returns True if it is inside the Array.
Bool casacore::IPosition_global_functions_IPosition_Indexing::isInsideArray | ( | const IPosition & | iposition, |
const IPosition & | shape | ||
) |
IPosition casacore::IPosition_global_functions_IPosition_Indexing::toIPositionInArray | ( | Int64 | offset, |
const IPosition & | shape | ||
) |
Convert from offset to IPosition in an array.
Int64 casacore::IPosition_global_functions_IPosition_Indexing::toOffsetInArray | ( | const IPosition & | iposition, |
const IPosition & | shape | ||
) |
Convert from IPosition to offset in an array.