casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
casa::LinearEquation< Domain, Range > Class Template Referenceabstract

defines a relationship between Domain and Range objects More...

#include <LinearEquation.h>

Inheritance diagram for casa::LinearEquation< Domain, Range >:
casa::ResidualEquation< Domain >

Public Member Functions

virtual ~LinearEquation ()
 A virtual destructor may be necessary for use in derived classes. More...
 
virtual casacore::Bool evaluate (Range &result, const LinearModel< Domain > &model)=0
 This function evaluates the Equation for the specified model. More...
 
virtual casacore::Bool residual (Domain &answer, const LinearModel< Domain > &model)=0
 evaluate residual More...
 
virtual casacore::Bool residual (Domain &answer, casacore::Float &chisq, const LinearModel< Domain > &model)=0
 Same as above, but also calculates Chi^2. More...
 
virtual casacore::Bool residual (Domain &answer, casacore::Float &chisq, Domain &mask, const LinearModel< Domain > &model)=0
 Same as above, but also calculates Chi^2 considering a mask. More...
 
- Public Member Functions inherited from casa::ResidualEquation< Domain >
virtual ~ResidualEquation ()
 A virtual destructor may be necessary for use in derived classes. More...
 

Detailed Description

template<class Domain, class Range>
class casa::LinearEquation< Domain, Range >

defines a relationship between Domain and Range objects

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

class should be read in conjunction with: LinearModel ResidualEquation

Etymology

LinearEquation was originally conceived for implementing linear equations (like Ax=b) but was in hindsight found to be more general.

Synopsis

This abstract class defines the basic functions used for forward modelling of measured data of "Range" data type. It defines the functions used to transform a model, of "Domain" data type to predicted data. It can also compare the predicted data with the measured data and return residuals to classes derived from LinearModel which can then be used to update the model.

Example

I'll pass this class into a subroutine as an actual instance of an abstract class cannot be constructed.

void foo(LinearModel< Image<casacore::Float> > mod,
LinearEquation<Image<casacore::Float>, VisibilitySet>)
VisibilitySet predictedVisibility;
eqn.evaluate(predictedVisibility, mod);

Motivation

This class was originally conceived to be used in implementing deconvolution algorithms. I would not be surprised if it found wider applicability.

Template Type Argument Requirements (Domain)

do not see any restrictions on the Domain class. Its up to the derived class to handle the the appropriate Domain.

Template Type Argument Requirements (Range)

order to calculate residuals it will probably be necessary for subtraction to be defined on the Range class, as well as some way for data in the Range data type to be converted back into the Domain data type. However it is left up to the derived classes to implement this.

Thrown Exceptions

is an interface class and does not contain any implementation (and hence does not throw exceptions)

Definition at line 106 of file LinearEquation.h.

Constructor & Destructor Documentation

template<class Domain, class Range>
virtual casa::LinearEquation< Domain, Range >::~LinearEquation ( )
virtual

A virtual destructor may be necessary for use in derived classes.

Member Function Documentation

template<class Domain, class Range>
virtual casacore::Bool casa::LinearEquation< Domain, Range >::evaluate ( Range &  result,
const LinearModel< Domain > &  model 
)
pure virtual

This function evaluates the Equation for the specified model.

It returns false if the result could not be computed.

Implemented in casa::ConvolutionEquation, and casa::LatConvEquation.

template<class Domain, class Range>
virtual casacore::Bool casa::LinearEquation< Domain, Range >::residual ( Domain &  answer,
const LinearModel< Domain > &  model 
)
pure virtual
template<class Domain, class Range>
virtual casacore::Bool casa::LinearEquation< Domain, Range >::residual ( Domain &  answer,
casacore::Float chisq,
const LinearModel< Domain > &  model 
)
pure virtual

Same as above, but also calculates Chi^2.

Implements casa::ResidualEquation< Domain >.

Implemented in casa::ConvolutionEquation, casa::LatConvEquation, and casa::IPLatConvEquation.

template<class Domain, class Range>
virtual casacore::Bool casa::LinearEquation< Domain, Range >::residual ( Domain &  answer,
casacore::Float chisq,
Domain &  mask,
const LinearModel< Domain > &  model 
)
pure virtual

Same as above, but also calculates Chi^2 considering a mask.

Implements casa::ResidualEquation< Domain >.

Implemented in casa::ConvolutionEquation, and casa::LatConvEquation.


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