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 LOG_DET_ESTIMATOR_H_ 00011 #define LOG_DET_ESTIMATOR_H_ 00012 00013 #include <shogun/lib/config.h> 00014 #include <shogun/base/SGObject.h> 00015 #include <shogun/base/Parameter.h> 00016 00017 namespace shogun 00018 { 00019 class CTraceSampler; 00020 template<class T> class COperatorFunction; 00021 class CIndependentComputationEngine; 00022 template<class T> class SGVector; 00023 template<class T> class SGMatrix; 00024 00032 class CLogDetEstimator : public CSGObject 00033 { 00034 public: 00036 CLogDetEstimator(); 00037 00045 CLogDetEstimator(CTraceSampler* trace_sampler, 00046 COperatorFunction<float64_t>* operator_log, 00047 CIndependentComputationEngine* computation_engine); 00048 00050 virtual ~CLogDetEstimator(); 00051 00059 SGVector<float64_t> sample(index_t num_estimates); 00060 00068 SGMatrix<float64_t> sample_without_averaging(index_t num_estimates); 00069 00071 virtual const char* get_name() const 00072 { 00073 return "LogDetEstimator"; 00074 } 00075 00076 private: 00078 CTraceSampler* m_trace_sampler; 00079 00081 COperatorFunction<float64_t>* m_operator_log; 00082 00084 CIndependentComputationEngine* m_computation_engine; 00085 00087 void init(); 00088 }; 00089 00090 } 00091 00092 #endif // LOG_DET_ESTIMATOR_H_