casa
$Rev:20696$
|
00001 //# LinearModel.h: this defines LinearModel 00002 //# Copyright (C) 1996,1997,1998,1999 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be addressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# 00027 //# $Id$ 00028 00029 #ifndef SYNTHESIS_LINEARMODEL_H 00030 #define SYNTHESIS_LINEARMODEL_H 00031 00032 #include <casa/aips.h> 00033 00034 namespace casa { //# NAMESPACE CASA - BEGIN 00035 00036 //# Forward Declarations 00037 00038 // <summary>Provides a model for use in model fitting applications</summary> 00039 00040 // <use visibility=export> 00041 00042 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos=""> 00043 // </reviewed> 00044 00045 // <prerequisite> 00046 // This class should be read in conjunction with: 00047 // <li> <linkto class="LinearEquation">LinearEquation</linkto> 00048 // <li> <linkto class="ResidualEquation">ResidualEquation</linkto> 00049 // </prerequisite> 00050 // 00051 // <etymology> 00052 // LinearModel was originally conceived for providing the model, and optionally 00053 // for derived classes the iterative solution methods for linear equations 00054 // (like Ax=b) but may be more general in scope. 00055 // </etymology> 00056 // 00057 // <synopsis> 00058 // This abstract class defines the interface between a model of the sky (or 00059 // any other quantity) and the equation used to predict the measured 00060 // quantities. It provides the current best guess model, and given 00061 // measures of the discrepency between the current model and the data (as 00062 // provided by the ResidualEquation class) derived classes may be able to 00063 // solve for a better model that corresponds more closely to the measured 00064 // data. 00065 // </synopsis> 00066 // 00067 // <example> 00068 // I'll pass this class into a function as an actual instance of an 00069 // abstract class cannot be constructed. 00070 // <srcblock> 00071 // void foo(LinearModel< Image<Float> > mod, 00072 // ResidualEquation< Image<Float> > eqn) 00073 // { 00074 // Image<Float> currentModel, newModel; 00075 // currentModel = mod.getModel(); // get the current model; 00076 // } 00077 // </srcblock> 00078 // </example> 00079 // 00080 // <motivation> 00081 // This class was originally conceived to be used in implementing 00082 // deconvolution algorithms. I would not be surprised if it found wider 00083 // applicability. 00084 // </motivation> 00085 // 00086 // <templating arg=Domain> 00087 // The template determines the external representation of the model used. 00088 // So complicated templates can be expected and should be OK. 00089 // </templating> 00090 // 00091 // <thrown> 00092 // This is an abstract class and does not contain any implementation (and 00093 // hence does not throw exceptions) 00094 // </thrown> 00095 // 00096 // <todo asof="1996/03/29"> 00097 // I cannot see what else I need to do with this class (famous last words) 00098 // </todo> 00099 00100 template<class Domain> class LinearModel 00101 { 00102 public: 00103 // A virtual destructor is necessary 00104 virtual ~LinearModel(); 00105 00106 // Return the current model. 00107 virtual const Domain & getModel() const = 0; 00108 00109 // Set the current model 00110 virtual void setModel(const Domain & model) = 0; 00111 }; 00112 00113 00114 } //# NAMESPACE CASA - END 00115 00116 #ifndef AIPS_NO_TEMPLATE_SRC 00117 #include <synthesis/MeasurementEquations/LinearModel.tcc> 00118 #endif //# AIPS_NO_TEMPLATE_SRC 00119 #endif