RFCubeLattice.h

Classes

RFCubeLatticeIterator -- RFCubeLatticeIterator: iterator over a cubic lattice (full description)
RFCubeLattice -- RFCubeLatice: a cubic lattice (full description)

template<class T> class RFCubeLatticeIterator : public LatticeIterator<T>

Interface

Protected Members
Matrix<T> * setupCursor ()
Public Members
RFCubeLatticeIterator()
RFCubeLatticeIterator( TempLattice<T> &lat,const IPosition &iter_shape )
~RFCubeLatticeIterator()
Matrix<T> * reset ( Bool will_read=True,Bool will_write=True )
void setRead ( Bool val=True )
void setWrite ( Bool val=True )
Matrix<T> * advance( Int iz )
Int position ()
Matrix<T> * cursor()
T & operator () ( uInt i,uInt j )

Description

Prerequisite

Synopsis

See RFCubeLattice, below

Template Type Argument Requirements (T)

To Do

Member Description

Matrix<T> * setupCursor ()

RFCubeLatticeIterator()

default constructor creates empty iterator

RFCubeLatticeIterator( TempLattice<T> &lat,const IPosition &iter_shape )

creates and attches to lattice

~RFCubeLatticeIterator()

destructor

Matrix<T> * reset ( Bool will_read=True,Bool will_write=True )

resets the lattice iterator to beginning, returns cursor

void setRead ( Bool val=True )

enables or diables read/write access

void setWrite ( Bool val=True )

Matrix<T> * advance( Int iz )

advances internal iterator to specified slot along the Z axis, returns cursor

Int position ()

returns position of internal iterator

Matrix<T> * cursor()

returns internal cursor

T & operator () ( uInt i,uInt j )

returns element at i,j of cursor


template<class T> class RFCubeLattice

Interface

RFCubeLattice()
RFCubeLattice( uInt nx,uInt ny,uInt nz,Int maxmem=-1 )
RFCubeLattice( uInt nx,uInt ny,uInt nz,const T &init_val,Int maxmem=-1 )
~RFCubeLattice()
void init ( uInt nx,uInt ny,uInt nz,Int maxmem=-1,Int tile_mb=2 )
void init ( uInt nx,uInt ny,uInt nz,const T &init_val,Int maxmem=-1,Int tile_mb=2 )
void cleanup ()
static uInt estimateMemoryUse ( uInt nx,uInt ny,uInt nz )
Matrix<T> * reset ( Bool will_read=True,Bool will_write=True )
Matrix<T> * advance( Int iz )
Int position ()
const IPosition & shape ()
Matrix<T> * cursor()
T & operator () ( uInt i,uInt j )
TempLattice<T> & lattice()
RFCubeLatticeIterator<T> & iterator()
RFCubeLatticeIterator<T> newIter()

Description

Prerequisite

Synopsis

RFCubeLattice is basically an specialized [NX,NY,NZ] TempLattice which is iterated over the Z axis.

Motivation

Many flagging agents make use of cubic lattices (typically, to maintain [NCHAN,NIFR,NTIME] cubes of something) in an identical way. This class provides a clean and convenient interface to the basic functions.

Template Type Argument Requirements (T)

To Do

Member Description

RFCubeLattice()

default constructor creates empty cube

RFCubeLattice( uInt nx,uInt ny,uInt nz,Int maxmem=-1 )

creates NX x NY x NZ cube

RFCubeLattice( uInt nx,uInt ny,uInt nz,const T &init_val,Int maxmem=-1 )

creates NX x NY x NZ cube and fills with initial value

~RFCubeLattice()

destructor

void init ( uInt nx,uInt ny,uInt nz,Int maxmem=-1,Int tile_mb=2 )

creates NX x NY x NZ cube tile_mb is the tile size, in MB (when using paging)

void init ( uInt nx,uInt ny,uInt nz,const T &init_val,Int maxmem=-1,Int tile_mb=2 )

creates NX x NY x NZ cube and fills with initial value tile_mb is the tile size, in MB (when using paging)

void cleanup ()

destroys cube

static uInt estimateMemoryUse ( uInt nx,uInt ny,uInt nz )

returns size of cube

Matrix<T> * reset ( Bool will_read=True,Bool will_write=True )

resets the lattice iterator to beginning.

Matrix<T> * advance( Int iz )

advances internal iterator to specified slot along the Z axis, returns cursor

Int position ()

returns position of internal iterator

const IPosition & shape ()

returns shape

Matrix<T> * cursor()

returns internal cursor

T & operator () ( uInt i,uInt j )

returns element at i,j of cursor

TempLattice<T> & lattice()

provides access to lattice itself

RFCubeLatticeIterator<T> & iterator()

provides access to iterator

RFCubeLatticeIterator<T> newIter()

creates a new iterator for this lattice