casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Iterate.h
Go to the documentation of this file.
00001 //# Iterate.h:
00002 //# Copyright (C) 1996,2000,2001
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 adressed 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_ITERATE_H
00030 #define SYNTHESIS_ITERATE_H
00031 
00032 #include <casa/aips.h>
00033 #include <casa/BasicSL/String.h>
00034 #include <casa/Utilities/Fallible.h>
00035 
00036 
00037 namespace casa { //# NAMESPACE CASA - BEGIN
00038 
00039 // Base class for Iteration
00040 class Iterate {
00041 public:
00042   // Constructor
00043   Iterate() : numberIterations_(100), gain_(1.0),
00044        tolerance_(0.000001), threshold_(0.0), free_(False), mode_("") {};
00045 
00046   virtual ~Iterate() {};
00047 
00048   // Is this a free variable?
00049   void setFree()
00050     {free_=True;};
00051   void setNotFree()
00052     {free_=False;};
00053   Bool free()
00054     {return(free_);};
00055 
00056   void setNumberIterations(const Int n) {numberIterations_=n;};
00057   void setGain(const Float g) {gain_=g;};
00058   void setTolerance(const Float t) {tolerance_=t;};
00059   void setThreshold(const Float t) {threshold_=t;};
00060   void setMode(const String m) {mode_=m;};
00061 
00062   Int numberIterations() {return numberIterations_;};
00063   const Float gain() {return gain_;};
00064   const Float tolerance() {return tolerance_;};
00065   virtual const Float threshold() {return threshold_;};
00066   const String mode() {return mode_;};
00067 
00068 private:    
00069   Int numberIterations_;
00070   Double gain_;
00071   Double tolerance_;
00072   Double threshold_;
00073   Bool free_;
00074   String mode_;
00075 };
00076 
00077 
00078 } //# NAMESPACE CASA - END
00079 
00080 #endif