casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Attributes
casa::ArrayModel< T > Class Template Reference

models with an internal & external representation as an array More...

#include <ArrayModel.h>

Inheritance diagram for casa::ArrayModel< T >:
casa::LinearModel< Array< T > > casa::HogbomCleanModel< T >

List of all members.

Public Member Functions

 ArrayModel ()
 ArrayModel (const Array< T > &model)
 ArrayModel (Array< T > &model)
virtual const Array< T > & getModel () const
 Return the current model.
virtual void getModel (Array< T > &model) const
virtual void setModel (const Array< T > &model)
 Set the current model.
virtual void setModel (Array< T > &model)

Protected Attributes

Array< T > theModel

Detailed Description

template<class T>
class casa::ArrayModel< T >

models with an internal & external representation as an array

Intended use:

Public interface

 <h3>Review Status</h3><dl><dt>Date Reviewed:<dd>yyyy/mm/dd</dl> 

Prerequisite

Synopsis

An ArrayModel is a base class for Models that can be represented by arrays. It is expected that this class will be mainly used as base classes for other classes which will then provide the solve() functions necessary to update the model given an equation.

However this class does not contain any pure virtual functions and hence can be used "as is". An example of this is given below. For an example of how this class can be used by derived classes see the HogbomCleanModel class.

This class makes an internal copy of the Array supplied to it (either when constructed or when using the setModel function). If this is found to significantly affect performance (execution speed or memory requirements) this may be changed to a reference, perhaps using a smart pointer like the COWPtr

Example

    ArrayModel<Float> currentModel(); // Cannot use the model yet!
    {
      Matrix<Float> bestGuess(32,32);
       ... put your best guess into the Matrix ..\.
      currentModel.setModel(bestGuess); // This does a real copy
    }
    ConvolutionEquation eqn(psf, dirty); // psf, and dirty are arrays defined
                                         // elsewhere.
    eqn.evaluate(result, currentModel); // Here result is the convolution of
                                        // of the model with the psf.

Motivation

All the different image plane based clean algorithms have a common implementation in that they can use an array to store the current model. This class provides a way to abstract this functionality.

Template Type Argument Requirements (T)

the template arguement for this class can be just about anything, the use of this class with an equation class will significantly restrict the possible templates. I have used this class (or derivations of it) with the following data types. Float StokesVector

Thrown Exceptions

class does not explicitly throw exceptions however the objects used by this class may

To Do

Definition at line 112 of file ArrayModel.h.


Constructor & Destructor Documentation

template<class T>
casa::ArrayModel< T >::ArrayModel ( )
template<class T>
casa::ArrayModel< T >::ArrayModel ( const Array< T > &  model)
template<class T>
casa::ArrayModel< T >::ArrayModel ( Array< T > &  model)

Member Function Documentation

template<class T>
virtual const Array<T>& casa::ArrayModel< T >::getModel ( ) const [virtual]

Return the current model.

Implements casa::LinearModel< Array< T > >.

template<class T>
virtual void casa::ArrayModel< T >::getModel ( Array< T > &  model) const [virtual]

Reimplemented in casa::ClarkCleanModel.

template<class T>
virtual void casa::ArrayModel< T >::setModel ( const Array< T > &  model) [virtual]

Set the current model.

Implements casa::LinearModel< Array< T > >.

Reimplemented in casa::ClarkCleanModel.

template<class T>
virtual void casa::ArrayModel< T >::setModel ( Array< T > &  model) [virtual]

Reimplemented in casa::ClarkCleanModel.


Member Data Documentation

template<class T>
Array<T> casa::ArrayModel< T >::theModel [protected]

Definition at line 126 of file ArrayModel.h.


The documentation for this class was generated from the following file: