28 #ifndef CASA_SLICER_2_H
29 #define CASA_SLICER_2_H
size_t nelements() const
The number of elements in this IPosition.
const IPosition & length() const
Report the length of the resulting axes.
void setEnd(const IPosition &end)
const IPosition & end() const
Report the defined ending position.
Slicer(const IPosition &start, const IPosition &end, LengthOrLast endInterpretation=endIsLength)
Slicer(const Slice &x, const Slice &y, const Slice &z, LengthOrLast endInterpretation=endIsLength)
Create a Slicer for a 3-dim array.
Slicer(const Slice &x, LengthOrLast endInterpretation=endIsLength)
Create a Slicer object from Slice objects.
const IPosition & stride() const
Report the defined stride.
Slicer(const Slice &x, const Slice &y, LengthOrLast endInterpretation=endIsLength)
Create a Slicer for a 2-dim array.
void fillSlice(const Slice &, ssize_t &start, ssize_t &length, ssize_t &stride)
Fill in start, len and stride from a Slice.
void fillEndLen()
Define a private constructor taking an ssize_t.
Slicer(const IPosition &start, const IPosition &end, const IPosition &stride, LengthOrLast endInterpretation=endIsLength)
The member function inferShapeFromSource (invoked as a callback by the source array) will use the sha...
const IPosition & start() const
Report the defined starting position.
void fillFixed()
Fill the fixed flag.
Slicer(const IPosition &start)
bool isFixed() const
Are all values fixed (i.e., no MimicSource given)?
Slicer()
Construct a 1-dimensional Slicer.
LengthOrLast
Define the possible interpretations of the end-value.
@ endIsLast
The end-values given in the constructor define the trc.
@ endIsLength
The end-values given in the constructor define the lengths.
bool operator==(const Slicer &) const
Equality.
size_t ndim() const
Return the number of dimensions of the Slicer.
IPosition inferShapeFromSource(const IPosition &shape, IPosition &startResult, IPosition &endResult, IPosition &strideResult) const
This function checks all of the start, length (or end), and stride IPositions, and fills in missing v...
void setStart(const IPosition &start)
Set the start and end positions.
this file contains all the compiler specific defines
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape.
std::string to_string(const IPosition &ip)
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.