Last change
on this file since 1611 was
1260,
checked in by ymipsl, 7 years ago
|
Buf fix in reduction. Missing value update was not set correctly
YM
|
File size:
1.0 KB
|
Rev | Line | |
---|
[979] | 1 | /*! |
---|
| 2 | \file average.hpp |
---|
| 3 | \author Ha NGUYEN |
---|
| 4 | \since 8 Sep 2016 |
---|
| 5 | \date 8 Sep 2016 |
---|
| 6 | |
---|
| 7 | \brief Average reduction |
---|
| 8 | */ |
---|
| 9 | #ifndef __XIOS_REDUCTION_AVERAGE_ALGORITHM_HPP__ |
---|
| 10 | #define __XIOS_REDUCTION_AVERAGE_ALGORITHM_HPP__ |
---|
| 11 | |
---|
| 12 | #include "reduction.hpp" |
---|
| 13 | |
---|
| 14 | namespace xios { |
---|
| 15 | |
---|
| 16 | /*! |
---|
| 17 | \class CAverageReductionAlgorithm |
---|
| 18 | Interface for all reduction alogrithms. |
---|
| 19 | */ |
---|
| 20 | class CAverageReductionAlgorithm : public CReductionAlgorithm |
---|
| 21 | { |
---|
| 22 | public: |
---|
| 23 | CAverageReductionAlgorithm(); |
---|
| 24 | |
---|
| 25 | virtual void apply(const std::vector<std::pair<int,double> >& localIndex, |
---|
| 26 | const double* dataInput, |
---|
| 27 | CArray<double,1>& dataOut, |
---|
[1158] | 28 | std::vector<bool>& flagInitial, |
---|
[1260] | 29 | bool ignoreMissingValue, bool firstPass); |
---|
[979] | 30 | |
---|
| 31 | virtual void updateData(CArray<double,1>& dataOut); |
---|
| 32 | |
---|
| 33 | virtual ~CAverageReductionAlgorithm() {} |
---|
| 34 | |
---|
| 35 | protected: |
---|
| 36 | CArray<double,1> weights_; |
---|
| 37 | bool resetWeight_; |
---|
| 38 | |
---|
| 39 | public: |
---|
| 40 | static bool registerTrans(); |
---|
| 41 | |
---|
| 42 | protected: |
---|
| 43 | static CReductionAlgorithm* create(); |
---|
| 44 | }; |
---|
| 45 | |
---|
| 46 | } |
---|
| 47 | #endif // __XIOS_REDUCTION_AVERAGE_ALGORITHM_HPP__ |
---|
Note: See
TracBrowser
for help on using the repository browser.