⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eventtreespacebase.h

📁 Amis - A maximum entropy estimator 一个最大熵模型统计工具
💻 H
字号:
////////////////////////////////////////////////////////////////////////////  Copyright (c) 2000, Yusuke Miyao///  You may distribute under the terms of the Artistic License.//////  <id>$Id: EventTreeSpaceBase.h,v 1.3 2003/05/11 18:12:09 yusuke Exp $</id>///  <collection>Maximum Entropy Estimator</collection>///  <name>EventTreeSpaceBase.h</name>///  <overview>A base class for an event space of event trees</overview>/////////////////////////////////////////////////////////////////////////#ifndef Amis_EventTreeSpaceBase_h_#define Amis_EventTreeSpaceBase_h_#include <amis/configure.h>#include <amis/EventTree.h>#include <amis/EventSpace.h>AMIS_NAMESPACE_BEGIN///////////////////////////////////////////////////////////////////////// <classdef>/// <name>EventTreeSpaceBase</name>/// <overview>A base class for EventTreeSpace</overview>/// <desc>A set of all possible events described in a tree structure in the task</desc>/// <body>template < class Feature >class EventTreeSpaceBase : public EventSpace< Feature, EventTree< Feature > > {public:  typedef typename Feature::FeatureFreq FeatureFreq;private:  int num_event_tree_nodes;  int max_event_tree_nodes;public:  EventTreeSpaceBase( void ) {    num_event_tree_nodes = 0;    max_event_tree_nodes = 0;  }  /// Constructor  virtual ~EventTreeSpaceBase() {}  /// Destructor  const std::string eventSpaceName( void ) const {    return "EventTreeSpaceBase<" + Feature::featureTypeName() + ">";  }  /// Get the name of this classpublic:  void addEvent( EventTree< Feature >& et ) {    num_event_tree_nodes += et.numEventTreeNodes();    max_event_tree_nodes = std::max( max_event_tree_nodes, et.numEventTreeNodes() );    EventSpace< Feature, EventTree< Feature > >::addEvent( et );  }  /// Add a new event tree to an event space  int numEventTreeNodes( void ) const { return num_event_tree_nodes; }  /// Get the total number of event tree nodes  int maxEventTreeNodes( void ) const { return max_event_tree_nodes; }  /// Get the maximum number of event tree nodes for an event tree};AMIS_NAMESPACE_END/// </body>/// </classdef>#endif // EventTreeSpaceBase_h_// end of EventTreeSpaceBase.h

⌨️ 快捷键说明

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