iislauncheritem.h

来自「Amis - A maximum entropy estimator 一个最大」· C头文件 代码 · 共 51 行

H
51
字号
#ifndef Amis_IISLauncherItem_h_#define Amis_IISLauncherItem_h_#include <amis/configure.h>#include <amis/EstimatorLauncher.h>#include <amis/Property.h>#include <amis/PropertyItem.h>AMIS_NAMESPACE_BEGINclass IISLauncherItemBase : public EstimatorLauncherItem {protected:  static PropertyItem< int > max_newton_iterations;  static PropertyItem< bool > feature_count_hash;public:  IISLauncherItemBase( const std::string& name,		       const std::string& event,		       const std::string& feature,		       const std::string& desc )    : EstimatorLauncherItem( name, event, feature, desc ) {}};template < class IISVector, class IISHash >class IISLauncherItem : public IISLauncherItemBase {public:  IISLauncherItem( const std::string& name,		   const std::string& event,		   const std::string& feature,		   const std::string& desc )    : IISLauncherItemBase( name, event, feature, desc ) {}  EstimatorPtr launch( Property* property ) {    if ( feature_count_hash.getValue() ) {      IISHash* iis = new IISHash();      iis->setMaxNewtonIterations( max_newton_iterations.getValue() );      iis->setNumThreads( property->getNumThreads() );      return EstimatorPtr( iis );    } else {      IISVector* iis = new IISVector();      iis->setMaxNewtonIterations( max_newton_iterations.getValue() );      iis->setNumThreads( property->getNumThreads() );      return EstimatorPtr( iis );    }  }};AMIS_NAMESPACE_END#endif // Amis_IISLauncherItem_h_// end of IISLauncherItem.h

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?