/*! \file average.hpp \author Ha NGUYEN \since 8 Sep 2016 \date 8 Sep 2016 \brief Average reduction */ #ifndef __XIOS_REDUCTION_AVERAGE_ALGORITHM_HPP__ #define __XIOS_REDUCTION_AVERAGE_ALGORITHM_HPP__ #include "reduction.hpp" namespace xios { /*! \class CAverageReductionAlgorithm Interface for all reduction alogrithms. */ class CAverageReductionAlgorithm : public CReductionAlgorithm { public: CAverageReductionAlgorithm(); virtual void apply(const std::vector >& localIndex, const double* dataInput, CArray& dataOut, std::vector& flagInitial, bool ignoreMissingValue); virtual void updateData(CArray& dataOut); virtual ~CAverageReductionAlgorithm() {} protected: CArray weights_; bool resetWeight_; public: static bool registerTrans(); protected: static CReductionAlgorithm* create(); }; } #endif // __XIOS_REDUCTION_AVERAGE_ALGORITHM_HPP__