LCOV - code coverage report
Current view: top level - synthesis/MeasurementEquations - Iterate.h (source / functions) Hit Total Coverage
Test: ctest_coverage.info Lines: 9 11 81.8 %
Date: 2023-11-06 10:06:49 Functions: 8 11 72.7 %

          Line data    Source code
       1             : //# Iterate.h:
       2             : //# Copyright (C) 1996,2000,2001
       3             : //# Associated Universities, Inc. Washington DC, USA.
       4             : //#
       5             : //# This library is free software; you can redistribute it and/or modify it
       6             : //# under the terms of the GNU Library General Public License as published by
       7             : //# the Free Software Foundation; either version 2 of the License, or (at your
       8             : //# option) any later version.
       9             : //#
      10             : //# This library is distributed in the hope that it will be useful, but WITHOUT
      11             : //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      12             : //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
      13             : //# License for more details.
      14             : //#
      15             : //# You should have received a copy of the GNU Library General Public License
      16             : //# along with this library; if not, write to the Free Software Foundation,
      17             : //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
      18             : //#
      19             : //# Correspondence concerning AIPS++ should be adressed as follows:
      20             : //#        Internet email: aips2-request@nrao.edu.
      21             : //#        Postal address: AIPS++ Project Office
      22             : //#                        National Radio Astronomy Observatory
      23             : //#                        520 Edgemont Road
      24             : //#                        Charlottesville, VA 22903-2475 USA
      25             : //#
      26             : //#
      27             : //# $Id$
      28             : 
      29             : #ifndef SYNTHESIS_ITERATE_H
      30             : #define SYNTHESIS_ITERATE_H
      31             : 
      32             : #include <casacore/casa/aips.h>
      33             : #include <casacore/casa/BasicSL/String.h>
      34             : #include <casacore/casa/Utilities/Fallible.h>
      35             : 
      36             : 
      37             : namespace casa { //# NAMESPACE CASA - BEGIN
      38             : 
      39             : // Base class for Iteration
      40             : class Iterate {
      41             : public:
      42             :   // Constructor
      43         277 :   Iterate() : numberIterations_(100), gain_(1.0),
      44         277 :        tolerance_(0.000001), threshold_(0.0), free_(false), mode_("") {};
      45             : 
      46         277 :   virtual ~Iterate() {};
      47             : 
      48             :   // Is this a free variable?
      49             :   void setFree()
      50             :     {free_=true;};
      51             :   void setNotFree()
      52             :     {free_=false;};
      53             :   casacore::Bool free()
      54             :     {return(free_);};
      55             : 
      56         240 :   void setNumberIterations(const casacore::Int n) {numberIterations_=n;};
      57         120 :   void setGain(const casacore::Float g) {gain_=g;};
      58           0 :   void setTolerance(const casacore::Float t) {tolerance_=t;};
      59         240 :   void setThreshold(const casacore::Float t) {threshold_=t;};
      60             :   void setMode(const casacore::String m) {mode_=m;};
      61             : 
      62         240 :   casacore::Int numberIterations() {return numberIterations_;};
      63        2834 :   casacore::Float gain() {return gain_;};
      64           0 :   casacore::Float tolerance() {return tolerance_;};
      65        4603 :   virtual casacore::Float threshold() {return threshold_;};
      66             :   const casacore::String mode() {return mode_;};
      67             : 
      68             : private:    
      69             :   casacore::Int numberIterations_;
      70             :   casacore::Double gain_;
      71             :   casacore::Double tolerance_;
      72             :   casacore::Double threshold_;
      73             :   casacore::Bool free_;
      74             :   casacore::String mode_;
      75             : };
      76             : 
      77             : 
      78             : } //# NAMESPACE CASA - END
      79             : 
      80             : #endif

Generated by: LCOV version 1.16