Functions | |
| void | ExtractSubtree (const SgUctTree &tree, SgUctTree &target, const std::vector< SgMove > &sequence, bool warnTruncate, double maxTime=std::numeric_limits< double >::max()) |
| Extract the subtree from the node after a sequence of moves. | |
| const SgUctNode * | FindChildWithMove (const SgUctTree &tree, const SgUctNode &node, SgMove move) |
| Find move node with a given move. | |
| void SgUctTreeUtil::ExtractSubtree | ( | const SgUctTree & | tree, | |
| SgUctTree & | target, | |||
| const std::vector< SgMove > & | sequence, | |||
| bool | warnTruncate, | |||
| double | maxTime = std::numeric_limits< double >::max() | |||
| ) |
Extract the subtree from the node after a sequence of moves.
The result is an empty tree, if the sequence of moves does not correspond to a sequence of nodes from the root node in the given tree.
| tree | The source tree. | |
| [out] | target | The target tree (will be cleared before using it). |
| sequence | The sequence of moves. | |
| warnTruncate | See SgUctTree::ExtractSubtree | |
| maxTime | See SgUctTree::ExtractSubtree |
Definition at line 79 of file SgUctTreeUtil.cpp.
References SgUctTree::Clear(), SgUctTree::ExtractSubtree(), FindChildWithMove(), and SgUctTree::Root().
| const SgUctNode * SgUctTreeUtil::FindChildWithMove | ( | const SgUctTree & | tree, | |
| const SgUctNode & | node, | |||
| SgMove | move | |||
| ) |
Find move node with a given move.
Definition at line 96 of file SgUctTreeUtil.cpp.
References SgUctNode::HasChildren().
Referenced by ExtractSubtree().