LCOV - code coverage report
Current view: top level - msvis/MSVis - IteratingParameters.cc (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 41 0.0 %
Date: 2024-10-10 19:51:30 Functions: 0 11 0.0 %

          Line data    Source code
       1             : //# IteratingParameters.cc: Implementation of the IteratingParameters class
       2             : //#
       3             : //#  CASA - Common Astronomy Software Applications (http://casa.nrao.edu/)
       4             : //#  Copyright (C) Associated Universities, Inc. Washington DC, USA 2015, All rights reserved.
       5             : //#  Copyright (C) European Southern Observatory, 2015, All rights reserved.
       6             : //#
       7             : //#  This library is free software; you can redistribute it and/or
       8             : //#  modify it under the terms of the GNU Lesser General Public
       9             : //#  License as published by the Free software Foundation; either
      10             : //#  version 2.1 of the License, or (at your option) any later version.
      11             : //#
      12             : //#  This library is distributed in the hope that it will be useful,
      13             : //#  but WITHOUT ANY WARRANTY, without even the implied warranty of
      14             : //#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      15             : //#  Lesser General Public License for more details.
      16             : //#
      17             : //#  You should have received a copy of the GNU Lesser General Public
      18             : //#  License along with this library; if not, write to the Free Software
      19             : //#  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
      20             : //#  MA 02111-1307  USA
      21             : //# $Id: $
      22             : 
      23             : #include <msvis/MSVis/IteratingParameters.h>
      24             : #include <stdcasa/UtilJ.h>
      25             : 
      26             : using namespace casacore;
      27             : namespace casa { //# NAMESPACE CASA - BEGIN
      28             : namespace vi { //# NAMESPACE VI - BEGIN
      29             : 
      30           0 : IteratingParameters::IteratingParameters() :
      31           0 :   chunkInterval_p(0.0),
      32           0 :   sortColumns_p(SortColumns()),
      33           0 :   weightScaling_p(0)
      34           0 : {}
      35             : 
      36           0 : IteratingParameters::IteratingParameters(Double chunkInterval, 
      37             :                                          const SortColumns& sortColumns, 
      38           0 :                                          WeightScaling * weightScaling) :
      39           0 :   chunkInterval_p(chunkInterval),
      40           0 :   sortColumns_p(sortColumns),
      41           0 :   weightScaling_p(weightScaling)
      42             : {
      43           0 :   validate();
      44           0 : }
      45             :   
      46           0 : IteratingParameters::IteratingParameters(const IteratingParameters& other)
      47             : {
      48           0 :   *this = other;
      49           0 : }
      50             : 
      51           0 : IteratingParameters& IteratingParameters::operator=(const IteratingParameters& other)
      52             : {
      53           0 :   if (this != &other) {
      54           0 :     chunkInterval_p = other.chunkInterval_p;
      55           0 :     sortColumns_p = other.sortColumns_p;
      56           0 :     weightScaling_p = other.weightScaling_p;
      57           0 :     validate();
      58             :   }
      59           0 :   return *this;
      60             : }
      61             : 
      62           0 : Double IteratingParameters::getChunkInterval() const
      63             : {
      64           0 :   return chunkInterval_p;
      65             : }
      66           0 : const SortColumns& IteratingParameters::getSortColumns() const
      67             : {
      68           0 :   return sortColumns_p;
      69             : }
      70           0 : WeightScaling* IteratingParameters::getWeightScaling() const
      71             : {
      72           0 :   return weightScaling_p;
      73             : }
      74             :   
      75             : 
      76           0 : void IteratingParameters::setChunkInterval(Double chunkInterval)
      77             : {
      78           0 :   ThrowIf (chunkInterval>=0, "chunkInterval must be >= 0.0");
      79           0 :   chunkInterval_p=chunkInterval;
      80           0 : }
      81             : 
      82           0 : void IteratingParameters::setSortColumns(const SortColumns& sortColumns)
      83             : {
      84           0 :   sortColumns_p=sortColumns;
      85           0 : }
      86           0 : void IteratingParameters::setWeightScaling(WeightScaling* weightScaling)
      87             : {
      88           0 :   weightScaling_p = weightScaling;
      89           0 : }
      90             :   
      91           0 : void IteratingParameters::validate()
      92             : {
      93           0 :   Assert(chunkInterval_p>=0.0);
      94           0 : }
      95             : 
      96             : } //# NAMESPACE VI - END
      97             : } //# NAMESPACE CASA - END
      98             : 
      99             : 

Generated by: LCOV version 1.16