28 #ifndef LATTICES_LATTICE_H
29 #define LATTICES_LATTICE_H
41 class LatticeNavigator;
42 template <
class T>
class Array;
44 template <
class Domain,
class Range>
class Functional;
352 virtual void apply (T (*
function)(T));
353 virtual void apply (T (*
function)(
const T&));
444 #ifndef CASACORE_NO_AUTO_TEMPLATES
446 #endif //# CASACORE_NO_AUTO_TEMPLATES
A Vector of integers, for indexing into Array<T> objects.
void operator+=(const Lattice< T > &other)
Add, subtract, multiple, or divide by another Lattice.
void operator*=(const Lattice< T > &other)
Map a domain object into a range object via operator().
virtual void set(const T &value)
Set all elements in the Lattice to the given value.
void operator/=(const Lattice< T > &other)
virtual void copyData(const Lattice< T > &from)
Copy the data from the given lattice to this one.
virtual ~Lattice()
a virtual destructor is needed so that it will use the actual destructor in the derived class ...
A non-templated, abstract base class for array-like objects.
T operator()(const IPosition &where) const
Return the value of the single element located at the argument IPosition.
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...
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 putAt(const T &value, const IPosition &where)
Put the value of a single element.
A base class for Lattice iterators.
A templated, abstract base class for array-like objects.
virtual IPosition shape() const =0
Return the shape of the Lattice including all degenerate axes (ie.
virtual Lattice< T > * clone() const =0
Make a copy of the derived object (reference semantics).
void put(const Array< T > &sourceBuffer)
Lattice< T > & operator=(const Lattice< T > &)
virtual void handleMath(const Lattice< T > &from, int oper)
Handle the Math operators (+=, -=, *=, /=).
virtual void copyDataTo(Lattice< T > &to) const
Copy the data from this lattice to the given lattice.
Copy-On-Write-Pointer class - allows control of copy based on constness.
void operator-=(const Lattice< T > &other)
virtual void handleMathTo(Lattice< T > &to, int oper) const
bool Bool
Define the standard types used by Casacore.
virtual Bool doGetSlice(Array< T > &buffer, const Slicer §ion)=0
The functions (in the derived classes) doing the actual work.
template <class T, class U> class vector;
Bool getSlice(COWPtr< Array< T > > &buffer, const Slicer §ion, Bool removeDegenerateAxes=False) const
virtual DataType dataType() const
Get the data type of the lattice.
Specify which elements to extract from an n-dimensional array.
virtual T getAt(const IPosition &where) const
virtual uInt advisedMaxPixels() const
This function returns the advised maximum number of pixels to include in the cursor of an iterator...
virtual void apply(T(*function)(T))
Replace every element, x, of the Lattice with the result of f(x).
Lattice()
Define default constructor to satisfy compiler.
virtual void doPutSlice(const Array< T > &buffer, const IPosition &where, const IPosition &stride)=0
Lattice(const Lattice< T > &)
Copy constructor and assignment can only be used by derived classes.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
Abstract base class to steer lattice iterators.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.