SHOGUN
v3.2.0
|
00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 3 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * Written (W) 2013 Soumyajit De 00008 */ 00009 00010 #ifndef STORE_SCALAR_AGGREGATOR_H_ 00011 #define STORE_SCALAR_AGGREGATOR_H_ 00012 00013 #include <shogun/lib/config.h> 00014 #include <shogun/lib/computation/aggregator/JobResultAggregator.h> 00015 00016 namespace shogun 00017 { 00018 class CJobResult; 00019 template<class T> class CScalarResult; 00020 00025 template<class T> class CStoreScalarAggregator : public CJobResultAggregator 00026 { 00028 typedef bool supports_complex128_t; 00029 00030 public: 00032 CStoreScalarAggregator(); 00033 00035 virtual ~CStoreScalarAggregator(); 00036 00043 virtual void submit_result(CJobResult* result); 00044 00049 virtual void finalize(); 00050 00052 virtual const char* get_name() const 00053 { 00054 return "StoreScalarAggregator"; 00055 } 00056 private: 00058 T m_aggregate; 00059 00061 void init(); 00062 }; 00063 00064 } 00065 00066 #endif // STORE_SCALAR_AGGREGATOR_H_