LCOV - code coverage report
Current view: top level - calanalysis/CalAnalysis - CalStatsFIT.cc (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 43 0.0 %
Date: 2024-10-10 19:51:30 Functions: 0 4 0.0 %

          Line data    Source code
       1             : 
       2             : // -----------------------------------------------------------------------------
       3             : 
       4             : /*
       5             : 
       6             : CalStatsFIT.cc
       7             : 
       8             : Description:
       9             : ------------
      10             : This file contains member functions for the nested CalStatsFitter::FIT class.
      11             : 
      12             : Classes:
      13             : --------
      14             : CalStatsFitter::FIT - This nested class contains the fit for the CalStatsFitter
      15             :                       class.
      16             : 
      17             : Modification history:
      18             : ---------------------
      19             : 2011 Dec 23 - Nick Elias, NRAO
      20             :               Initial version.
      21             : 
      22             : */
      23             : 
      24             : // -----------------------------------------------------------------------------
      25             : // Includes
      26             : // -----------------------------------------------------------------------------
      27             : 
      28             : #include <calanalysis/CalAnalysis/CalStatsFitter.h>
      29             : 
      30             : // -----------------------------------------------------------------------------
      31             : // Start of casa namespace
      32             : // -----------------------------------------------------------------------------
      33             : 
      34             : using namespace casacore;
      35             : namespace casa {
      36             : 
      37             : // -----------------------------------------------------------------------------
      38             : // Start of CalStatsFitter::FIT nested class
      39             : // -----------------------------------------------------------------------------
      40             : 
      41             : /*
      42             : 
      43             : CalStatsFitter::FIT
      44             : 
      45             : Description:
      46             : ------------
      47             : This nested class contains the fit for the CalStatsFitter class.
      48             : 
      49             : Class public member functions:
      50             : ------------------------------
      51             : FIT       - This constructor is the default that initializes variables.
      52             : FIT       - This construtor copies the input instance to the present instance.
      53             : ~FIT      - This destructor destroys the instance.
      54             : operator= - This function sets one instance to another.
      55             : 
      56             : Modification history:
      57             : ---------------------
      58             : 2011 Dec 23 - Nick Elias, NRAO
      59             :               Initial version containing FIT() (default), FIT() (copy), ~FIT(),
      60             :               and operator=().
      61             : 
      62             : */
      63             : 
      64             : // -----------------------------------------------------------------------------
      65             : // Start of CalStatsFitter::FIT public member functions
      66             : // -----------------------------------------------------------------------------
      67             : 
      68             : /*
      69             : 
      70             : CalStatsFitter::FIT::FIT (default)
      71             : 
      72             : Description:
      73             : ------------
      74             : This constructor is the default that initializes variables.
      75             : 
      76             : Inputs:
      77             : -------
      78             : None.
      79             : 
      80             : Outputs:
      81             : --------
      82             : None.
      83             : 
      84             : Modification history:
      85             : ---------------------
      86             : 2011 Dec 23 - Nick Elias, NRAO
      87             :               Initial version.
      88             : 
      89             : */
      90             : 
      91             : // -----------------------------------------------------------------------------
      92             : 
      93           0 : CalStatsFitter::FIT::FIT( void ) {
      94             : 
      95             :   // Initialize the public variables and return
      96             : 
      97           0 :   eOrder = CalStatsFitter::ORDER_INIT;
      98           0 :   eType = CalStatsFitter::TYPE_INIT;
      99           0 :   eWeight = CalStatsFitter::WEIGHT_INIT;
     100           0 :   bValid = false;
     101           0 :   oPars = Vector<Double>();
     102           0 :   oCovars = Matrix<Double>();
     103           0 :   oModel = Vector<Double>();
     104           0 :   oRes = Vector<Double>();
     105           0 :   dResVar = 0.0;
     106           0 :   dResMean = 0.0;
     107           0 :   dRedChi2 = 0.0;
     108             : 
     109           0 :   return;
     110             : 
     111           0 : }
     112             : 
     113             : // -----------------------------------------------------------------------------
     114             : 
     115             : /*
     116             : 
     117             : CalStatsFitter::FIT::FIT (copy)
     118             : 
     119             : Description:
     120             : ------------
     121             : This construtor copies the input instance to the present instance.
     122             : 
     123             : Inputs:
     124             : -------
     125             : oFit - This reference to a CalStatsFitter::FIT instance contains the fit
     126             :        information.
     127             : 
     128             : Outputs:
     129             : --------
     130             : None.
     131             : 
     132             : Modification history:
     133             : ---------------------
     134             : 2011 Dec 23 - Nick Elias, NRAO
     135             :               Initial version.
     136             : 
     137             : */
     138             : 
     139             : // -----------------------------------------------------------------------------
     140             : 
     141           0 : CalStatsFitter::FIT::FIT( const CalStatsFitter::FIT& oFit ) {
     142             : 
     143             :   // Copy the public variables from the input instance to this instance and
     144             :   // return
     145             : 
     146           0 :   eOrder = oFit.eOrder;
     147           0 :   eType = oFit.eType;
     148           0 :   eWeight = oFit.eWeight;
     149           0 :   bValid = oFit.bValid;
     150           0 :   oPars = Vector<Double>( oFit.oPars.copy() );
     151           0 :   oCovars = Matrix<Double>( oFit.oCovars.copy() );
     152           0 :   oModel = Vector<Double>( oFit.oModel.copy() );
     153           0 :   oRes = Vector<Double>( oFit.oRes.copy() );
     154           0 :   dResVar = oFit.dResVar;
     155           0 :   dResMean = oFit.dResMean;
     156           0 :   dRedChi2 = oFit.dRedChi2;
     157             : 
     158           0 :   return;
     159             : 
     160           0 : }
     161             : 
     162             : // -----------------------------------------------------------------------------
     163             : 
     164             : /*
     165             : 
     166             : CalStatsFitter::FIT::~FIT
     167             : 
     168             : Description:
     169             : ------------
     170             : This destructor destroys the instance.
     171             : 
     172             : Inputs:
     173             : -------
     174             : None.
     175             : 
     176             : Outputs:
     177             : --------
     178             : None.
     179             : 
     180             : Modification history:
     181             : ---------------------
     182             : 2011 Dec 23 - Nick Elias, NRAO
     183             :               Initial version.
     184             : 
     185             : */
     186             : 
     187             : // -----------------------------------------------------------------------------
     188             : 
     189           0 : CalStatsFitter::FIT::~FIT( void ) {}
     190             : 
     191             : // -----------------------------------------------------------------------------
     192             : 
     193             : /*
     194             : 
     195             : CalStatsFitter::FIT::operator=
     196             : 
     197             : Description:
     198             : ------------
     199             : This function sets one instance to another.
     200             : 
     201             : Inputs:
     202             : -------
     203             : oFit - This reference to a CalStatsFitter::FIT instance contains the fit
     204             :        information.
     205             : 
     206             : Outputs:
     207             : --------
     208             : None.
     209             : 
     210             : Modification history:
     211             : ---------------------
     212             : 2011 Dec 23 - Nick Elias, NRAO
     213             :               Initial version.
     214             : 
     215             : */
     216             : 
     217             : // -----------------------------------------------------------------------------
     218             : 
     219           0 : CalStatsFitter::FIT& CalStatsFitter::FIT::operator=(
     220             :     const CalStatsFitter::FIT& oFit ) {
     221             : 
     222             :   // If this instance is not the same as the input instance, copy the public
     223             :   // variables to this one and return
     224             : 
     225           0 :   if ( this != &oFit ) {
     226           0 :     eOrder = oFit.eOrder;
     227           0 :     eType = oFit.eType;
     228           0 :     eWeight = oFit.eWeight;
     229           0 :     bValid = oFit.bValid;
     230           0 :     oPars = Vector<Double>( oFit.oPars.copy() );
     231           0 :     oCovars = Matrix<Double>( oFit.oCovars.copy() );
     232           0 :     oModel = Vector<Double>( oFit.oModel.copy() );
     233           0 :     oRes = Vector<Double>( oFit.oRes.copy() );
     234           0 :     dResVar = oFit.dResVar;
     235           0 :     dResMean = oFit.dResMean;
     236           0 :     dRedChi2 = oFit.dRedChi2;
     237             :   }
     238             :   
     239           0 :   return( *this );
     240             : 
     241             : }
     242             : 
     243             : // -----------------------------------------------------------------------------
     244             : // End of CalStatsFitter::FIT public member functions
     245             : // -----------------------------------------------------------------------------
     246             : 
     247             : // -----------------------------------------------------------------------------
     248             : // End of CalStatsFitter::FIT nested class
     249             : // -----------------------------------------------------------------------------
     250             : 
     251             : };
     252             : 
     253             : // -----------------------------------------------------------------------------
     254             : // End of casa namespace
     255             : // -----------------------------------------------------------------------------

Generated by: LCOV version 1.16