winnertree.h

来自「datastucutre and algorithms, application」· C头文件 代码 · 共 23 行

H
23
字号
// abstract class winner tree
// all methods are pure virtual functions

#ifndef winnerTree_
#define winnerTree_

using namespace std;

template<class T>
class winnerTree 
{
   public:
      virtual ~winnerTree() {}
      virtual void initialize(T *thePlayer, int theNumberOfPlayers) = 0;
         // create winner tree with thePlayer[1:numberOfPlayers]
      virtual int winner() const = 0;
         // return index of winner
      virtual void rePlay(int thePLayer) = 0;
         // replay matches following a change in thePLayer
};
#endif

⌨️ 快捷键说明

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