Loading...
Searching...
No Matches
StatisticsTypes.h
Go to the documentation of this file.
//# Copyright (C) 2000,2001
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: casa-feedback@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
#ifndef SCIMATH_STATISTICSTYPES_H
#define SCIMATH_STATISTICSTYPES_H
#include <casacore/casa/aips.h>
#include <utility>
#include <vector>
#include <memory>
// because the template signature has become unwieldy
#define CASA_STATD template < \
class AccumType, class DataIterator, class MaskIterator, \
class WeightsIterator \
>
#define CASA_STATP AccumType, DataIterator, MaskIterator, WeightsIterator
#define CASA_STATQ DataIterator, MaskIterator, WeightsIterator
namespace casacore {
class Record;
// Commonly used types in statistics framework.
#define DataArray std::vector<AccumType>
#define DataRanges std::vector<std::pair<AccumType, AccumType>>
#define IncludeLimits std::vector<std::pair<AccumType, AccumType>>
using BinCountArray = std::vector<uInt64>;
using LocationType = std::pair<Int64, Int64>;
template <class AccumType> struct StatsData {
Bool masked;
std::shared_ptr<AccumType> max;
LocationType maxpos;
AccumType mean;
std::shared_ptr<AccumType> median;
std::shared_ptr<AccumType> medAbsDevMed;
std::shared_ptr<AccumType> min;
LocationType minpos;
Double npts;
AccumType nvariance;
AccumType rms;
AccumType stddev;
AccumType sum;
AccumType sumsq;
AccumType sumweights;
AccumType variance;
Bool weighted;
};
template <class AccumType>
StatsData<AccumType> initializeStatsData();
template <class AccumType>
StatsData<AccumType> copy(const StatsData<AccumType>& stats);
template <class AccumType>
Record toRecord(const StatsData<AccumType>& stats);
}
#ifndef CASACORE_NO_AUTO_TEMPLATES
#include <casacore/scimath/StatsFramework/StatisticsTypes.tcc>
#endif //# CASACORE_NO_AUTO_TEMPLATES
#endif
casacore::Record
Record()
casacore
this file contains all the compiler specific defines
Definition mainpage.dox:28
casacore::initializeStatsData
StatsData< AccumType > initializeStatsData()
casacore::copy
void copy(double *target, int npixels) const
casacore::LocationType
std::pair< Int64, Int64 > LocationType
Definition StatisticsTypes.h:53
casacore::toRecord
Record toRecord(const StatsData< AccumType > &stats)
casacore::Bool
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
casacore::BinCountArray
std::vector< uInt64 > BinCountArray
Definition StatisticsTypes.h:52
casacore::Double
double Double
Definition aipstype.h:53
casacore::StatsData
Definition StatisticsTypes.h:55
casacore::StatsData::npts
Double npts
Definition StatisticsTypes.h:64
casacore::StatsData::nvariance
AccumType nvariance
Definition StatisticsTypes.h:65
casacore::StatsData::sumweights
AccumType sumweights
Definition StatisticsTypes.h:70
casacore::StatsData::variance
AccumType variance
Definition StatisticsTypes.h:71
casacore::StatsData::max
std::shared_ptr< AccumType > max
Definition StatisticsTypes.h:57
casacore::StatsData::rms
AccumType rms
Definition StatisticsTypes.h:66
casacore::StatsData::median
std::shared_ptr< AccumType > median
Definition StatisticsTypes.h:60
casacore::StatsData::sumsq
AccumType sumsq
Definition StatisticsTypes.h:69
casacore::StatsData::min
std::shared_ptr< AccumType > min
Definition StatisticsTypes.h:62
casacore::StatsData::sum
AccumType sum
Definition StatisticsTypes.h:68
casacore::StatsData::minpos
LocationType minpos
Definition StatisticsTypes.h:63
casacore::StatsData::mean
AccumType mean
Definition StatisticsTypes.h:59
casacore::StatsData::masked
Bool masked
Definition StatisticsTypes.h:56
casacore::StatsData::medAbsDevMed
std::shared_ptr< AccumType > medAbsDevMed
Definition StatisticsTypes.h:61
casacore::StatsData::stddev
AccumType stddev
Definition StatisticsTypes.h:67
casacore::StatsData::weighted
Bool weighted
Definition StatisticsTypes.h:72
casacore::StatsData::maxpos
LocationType maxpos
Definition StatisticsTypes.h:58