39 template<
class T>
class Matrix;
80 template<
class T>
class Cube :
public Array<T>
88 Cube(
size_t l1,
size_t l2,
size_t l3);
91 Cube(
size_t l1,
size_t l2,
size_t l3, ArrayInitPolicy initPolicy);
95 Cube(
size_t l1,
size_t l2,
size_t l3,
const T &initialValue);
98 Cube(
const IPosition &len);
101 Cube(
const IPosition &len, ArrayInitPolicy initPolicy);
105 Cube(
const IPosition &len,
const T &initialValue);
108 Cube(
const Cube<T> &);
113 Cube(
const Array<T> &);
121 Cube(
const IPosition &
shape,
const T *storage);
128 virtual void assign (
const Array<T>& other);
132 virtual void reference(
const Array<T> &other);
137 using Array<T>::resize;
177 #if defined(AIPS_ARRAY_INDEX_CHECK)
185 #if defined(AIPS_ARRAY_INDEX_CHECK)
193 T &
at(
size_t i1,
size_t i2,
size_t i3)
195 #if defined(AIPS_ARRAY_INDEX_CHECK)
202 const T &
at(
size_t i1,
size_t i2,
size_t i3)
const
204 #if defined(AIPS_ARRAY_INDEX_CHECK)
222 const Slice &sliceZ);
224 const Slice &sliceZ)
const;
329 #ifndef CASACORE_NO_AUTO_TEMPLATES
330 #include <casacore/casa/Arrays/Cube.tcc>
331 #endif //# CASACORE_NO_AUTO_TEMPLATES
Bool contiguous_p
Are the data contiguous?
A Vector of integers, for indexing into Array<T> objects.
void makeIndexingConstants()
Helper fn to calculate the indexing constants.
Cube< T > & operator=(const Cube< T > &other)
Copy the values from other to this cube.
const Array< T > operator()(const IPosition &blc, const IPosition &trc) const
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
T & operator()(const IPosition &i)
Single-pixel addressing.
Cube()
A Cube of length zero in each dimension; zero origin.
T & operator()(size_t i1, size_t i2, size_t i3)
size_t nrow() const
The number of rows in the Cube, i.e.
const IPosition & shape() const
The length of each axis of the cube.
A 3-D Specialization of the Array class.
virtual Bool ok() const
Checks that the cube is consistent (invariants check out).
size_t ncolumn() const
The number of columns in the Cube, i.e.
A 2-D Specialization of the Array class.
void shape(Int &s1, Int &s2, Int &s3) const
TableExprNode marray(const TableExprNode &array, const TableExprNode &mask)
Form a masked array.
virtual void reference(const Array< T > &other)
Make this cube a reference to other.
A global enum used by some Array/Block constructors.
IPosition length_p
Used to hold the shape, increment into the underlying storage and originalLength of the array...
virtual ~Cube()
Define a destructor, otherwise the (SUN) compiler makes a static one.
Array< T > operator()(const IPosition &blc, const IPosition &trc)
Array< T > operator()(const IPosition &blc, const IPosition &trc, const IPosition &incr)
Slice using IPositions.
const Array< T > operator()(const Slicer &slicer) const
Class for masking an Array for operations on that Array.
T & at(size_t i1, size_t i2, size_t i3)
void validateIndex(const IPosition &) const
virtual void preTakeStorage(const IPosition &shape)
pre/post processing hook of takeStorage() for subclasses.
size_t xinc_p
Cached constants to improve indexing.
const T & operator()(const IPosition &i) const
define a (start,length,increment) along an axis
virtual void resize()
Make this array a different shape.
virtual Array< T > & operator=(const Array< T > &other)
Copy the values in other to this.
const T & operator()(size_t i1, size_t i2, size_t i3) const
void resize(size_t nx, size_t ny, size_t nz, Bool copyValues=False)
T & operator()(const IPosition &)
Access a single element of the array.
bool Bool
Define the standard types used by Casacore.
virtual void assign(const Array< T > &other)
Assign the other array (which must be dimension 3) to this cube.
T * begin_p
This pointer is adjusted to point to the first element of the array.
template <class T, class U> class vector;
size_t nplane() const
The number of planes in the Cube, i.e.
Specify which elements to extract from an n-dimensional array.
virtual void postTakeStorage()
Matrix< T > xyPlane(size_t zplane)
Extract a plane as a matrix referencing the original data.
Matrix< T > yzPlane(size_t xplane)
COPY is used when an internal copy of the storage is to be made.
StorageInitPolicy
A global enum used by some Array constructors.
Array< T > operator()(const Slicer &slicer)
Matrix< T > xzPlane(size_t yplane)
virtual void doNonDegenerate(const Array< T > &other, const IPosition &ignoreAxes)
Remove the degenerate axes from other and store result in this cube.
const Array< T > operator()(const IPosition &blc, const IPosition &trc, const IPosition &incr) const
Array< T > & operator=(const T &val)
Copy val into every element of this cube; i.e.
const T & at(size_t i1, size_t i2, size_t i3) const
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.