bfgslauncheritem.h

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

H
43
字号
#ifndef Amis_BFGSLauncherItem_h_#define Amis_BFGSLauncherItem_h_#include <amis/configure.h>#include <amis/EstimatorLauncher.h>#include <amis/Property.h>AMIS_NAMESPACE_BEGINclass BFGSLauncherItemBase : public EstimatorLauncherItem {public:  static PropertyItem< int > memory_size;public:  BFGSLauncherItemBase( const std::string& name,			const std::string& event,			const std::string& feature,			const std::string& desc )    : EstimatorLauncherItem( name, event, feature, desc ) {}};template < class BFGS >class BFGSLauncherItem : public BFGSLauncherItemBase {public:  BFGSLauncherItem( const std::string& name,		    const std::string& event,		    const std::string& feature,		    const std::string& desc )    : BFGSLauncherItemBase( name, event, feature, desc ) {}  EstimatorPtr launch( Property* property ) {    BFGS* bfgs = new BFGS();    bfgs->setMemorySize( memory_size.getValue() );    bfgs->setNumThreads( property->getNumThreads() );    return EstimatorPtr( bfgs );  }};AMIS_NAMESPACE_END#endif // Amis_BFGSLauncherItem_h_// end of BFGSLauncherItem.h

⌨️ 快捷键说明

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