src/betting_tree.cpp
// A subtree constructor
// This doesn't preserve the reentrancy of the source tree
A subtree constructor
This doesn't preserve the reentrancy of the source tree
A subtree constructor This doesn ' t preserve the reentrancy of the source tree
BettingTree::BettingTree(Node *subtree_root) {
  int subtree_street = subtree_root->Street();
  initial_street_ = subtree_street;
  num_terminals_ = 0;
  root_ = Clone(subtree_root, &num_terminals_);
  FillTerminalArray();
  int num_players = Game::NumPlayers();
  int max_street = Game::MaxStreet();
  num_nonterminals_.reset(new int[num_players * (max_street + 1)]);
  AssignNonterminalIDs(this, num_nonterminals_.get());
}
BettingTree :: BettingTree ( Node * subtree_root ) { int subtree_street = subtree_root -> Street ( ) ; initial_street_ = subtree_street ; num_terminals_ = 0 ; root_ = Clone ( subtree_root , & num_terminals_ ) ; FillTerminalArray ( ) ; int num_players = Game :: NumPlayers ( ) ; int max_street = Game :: MaxStreet ( ) ; num_nonterminals_ . reset ( new int [ num_players * ( max_street + 1 ) ] ) ; AssignNonterminalIDs ( this , num_nonterminals_ . get ( ) ) ; }
A subtree constructor
This doesn't preserve the reentrancy of the source tree
A subtree constructor This doesn ' t preserve the reentrancy of the source tree
// AssignNonterminalIDs() doesn't handle reentrancy yet.  We currently do not preserve the // reentrancy of the source tree inside of Clone().  But if we did, then we would need to // modify AssignNonterminalIDs() accordingly.