Go to the documentation of this file.
28 #ifndef LATTICES_LATTICE_H
29 #define LATTICES_LATTICE_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/lattices/Lattices/LatticeBase.h>
35 #include <casacore/casa/Arrays/Slicer.h>
41 class LatticeNavigator;
42 template <
class T>
class Array;
43 template <
class T>
class COWPtr;
44 template <
class Domain,
class Range>
class Functional;
45 template <
class T>
class LatticeIterInterface;
352 virtual void apply (T (*
function)(T));
353 virtual void apply (T (*
function)(
const T&));
444 #ifndef CASACORE_NO_AUTO_TEMPLATES
445 #include <casacore/lattices/Lattices/LatticeIterator.h>
446 #endif //# CASACORE_NO_AUTO_TEMPLATES
virtual Bool doGetSlice(Array< T > &buffer, const Slicer §ion)=0
The functions (in the derived classes) doing the actual work.
virtual void copyData(const Lattice< T > &from)
Copy the data from the given lattice to this one.
virtual uInt advisedMaxPixels() const
This function returns the advised maximum number of pixels to include in the cursor of an iterator.
void operator+=(const Lattice< T > &other)
Add, subtract, multiple, or divide by another Lattice.
virtual void apply(T(*function)(T))
Replace every element, x, of the Lattice with the result of f(x).
Array< T > get(Bool removeDegenerateAxes=False) const
T operator()(const IPosition &where) const
Return the value of the single element located at the argument IPosition.
virtual void doPutSlice(const Array< T > &buffer, const IPosition &where, const IPosition &stride)=0
virtual T getAt(const IPosition &where) const
Lattice< T > & operator=(const Lattice< T > &)
virtual void apply(const Functional< T, T > &function)
void operator-=(const Lattice< T > &other)
virtual ~Lattice()
a virtual destructor is needed so that it will use the actual destructor in the derived class
void put(const Array< T > &sourceBuffer)
Bool get(Array< T > &buffer, Bool removeDegenerateAxes=False)
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
virtual Lattice< T > * clone() const =0
Make a copy of the derived object (reference semantics).
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape.
virtual void putAt(const T &value, const IPosition &where)
Put the value of a single element.
void operator*=(const Lattice< T > &other)
Bool get(COWPtr< Array< T > > &buffer, Bool removeDegenerateAxes=False) const
Functions which extract an Array of values from a Lattice.
virtual void handleMath(const Lattice< T > &from, int oper)
Handle the Math operators (+=, -=, *=, /=).
Bool getSlice(COWPtr< Array< T > > &buffer, const Slicer §ion, Bool removeDegenerateAxes=False) const
void operator/=(const Lattice< T > &other)
Array< T > getSlice(const IPosition &start, const IPosition &shape, const IPosition &stride, Bool removeDegenerateAxes=False) const
this file contains all the compiler specific defines
virtual DataType dataType() const
Get the data type of the lattice.
Lattice(const Lattice< T > &)
Copy constructor and assignment can only be used by derived classes.
Bool getSlice(COWPtr< Array< T > > &buffer, const IPosition &start, const IPosition &shape, const IPosition &stride, Bool removeDegenerateAxes=False) const
Array< T > getSlice(const Slicer §ion, Bool removeDegenerateAxes=False) const
Array< T > getSlice(const IPosition &start, const IPosition &shape, Bool removeDegenerateAxes=False) const
template <class T, class U> class vector;
Bool getSlice(Array< T > &buffer, const IPosition &start, const IPosition &shape, Bool removeDegenerateAxes=False)
virtual void handleMathTo(Lattice< T > &to, int oper) const
Lattice()
Define default constructor to satisfy compiler.
bool Bool
Define the standard types used by Casacore.
Bool getSlice(Array< T > &buffer, const IPosition &start, const IPosition &shape, const IPosition &stride, Bool removeDegenerateAxes=False)
virtual void apply(T(*function)(const T &))
void putSlice(const Array< T > &sourceBuffer, const IPosition &where)
virtual LatticeIterInterface< T > * makeIter(const LatticeNavigator &navigator, Bool useRef) const
These functions are used by the LatticeIterator class to generate an iterator of the correct type for...
virtual void set(const T &value)
Set all elements in the Lattice to the given value.
void putSlice(const Array< T > &sourceBuffer, const IPosition &where, const IPosition &stride)
A function which places an Array of values within this instance of the Lattice at the location specif...
Bool getSlice(COWPtr< Array< T > > &buffer, const IPosition &start, const IPosition &shape, Bool removeDegenerateAxes=False) const
virtual void copyDataTo(Lattice< T > &to) const
Copy the data from this lattice to the given lattice.
Bool getSlice(Array< T > &buffer, const Slicer §ion, Bool removeDegenerateAxes=False)