📄 efgutils.h
字号:
//// $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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -