efgutils.h

来自「Gambit 是一个游戏库理论软件」· C头文件 代码 · 共 74 行

H
74
字号
//// $Source: /home/gambit/CVS/gambit/sources/game/efgutils.h,v $// $Date: 2002/08/26 05:50:07 $// $Revision: 1.4 $//// DESCRIPTION:// Utility functions on extensive form games//// This file is part of Gambit// Copyright (c) 2002, The Gambit Project//// This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation; either version 2 of the License, or// (at your option) any later version.//// This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the// GNU General Public License for more details.//// You should have received a copy of the GNU General Public License// along with this program; if not, write to the Free Software// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.//#ifndef EFGUTILS_H#define EFGUTILS_H#include "efg.h"#include "node.h"// returns a glist of all nodes in the extensive formvoid Nodes (const efgGame &befg, gList <Node *> &list);void Nodes (const efgGame &befg, Node *n, gList <Node *> &list);// returns the number of nodes in the extensive formint NumNodes (const efgGame &befg);// returns the number of nodes given a starting nodeint CountNodes (const efgGame &e, Node *n);// returns the action leading up to the nodeAction* LastAction(const efgGame &e, Node *node);// returns the list of nodes which are marked as the roots of subgamesvoid MarkedSubgameRoots(const efgGame &efg, gList<Node *> &list);// returns the list of nodes which are valid roots of subgamesvoid LegalSubgameRoots(const efgGame &efg, gList<Node *> &list);void LegalSubgameRoots(const efgGame &efg, Node *, gList<Node *> &);bool HasSubgames(const efgGame &efg);bool HasSubgames(const efgGame &, Node *n);bool AllSubgamesMarked(const efgGame &efg);// returns the list of nodes which are roots of child subgamesvoid ChildSubgames(const efgGame &, Node *, gList<Node *> &);// determines if a game is perfect recall.  // if not, returns a pair of infosets violating the definitionbool IsPerfectRecall(const efgGame &);bool IsPerfectRecall(const efgGame &, Infoset *&, Infoset *&);void RandomEfg(const efgGame &);efgGame *CompressEfg(const efgGame &, const EFSupport &);#endif // EFGUTILS_H

⌨️ 快捷键说明

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