src/betting_tree.cpp
// Two succs correspond if they are both call succs
// Two succs correspond if they are both fold succs
// Two succs correspond if they are both bet succs and the bet size is the
// same.
// Problem: in graft trees bet succs may not have a call succ.  So how do we
// compare if two bet succs are the same?
Two succs correspond if they are both call succs
Two succs correspond if they are both fold succs
Two succs correspond if they are both bet succs and the bet size is the
same.
Problem: in graft trees bet succs may not have a call succ.
Two succs correspond if they are both call succs Two succs correspond if they are both fold succs Two succs correspond if they are both bet succs and the bet size is the same . Problem : in graft trees bet succs may not have a call succ .
bool TwoSuccsCorrespond(Node *node1, int s1, Node *node2,
			int s2) {
  bool is_call_succ1 = (s1 == node1->CallSuccIndex());
  bool is_call_succ2 = (s2 == node2->CallSuccIndex());
  if (is_call_succ1 && is_call_succ2) return true;
  if (is_call_succ1 || is_call_succ2) return false;
  bool is_fold_succ1 = (s1 == node1->FoldSuccIndex());
  bool is_fold_succ2 = (s2 == node2->FoldSuccIndex());
  if (is_fold_succ1 && is_fold_succ2) return true;
  if (is_fold_succ1 || is_fold_succ2) return false;
  Node *b1 = node1->IthSucc(s1);
  Node *bc1 = b1->IthSucc(b1->CallSuccIndex());
  Node *b2 = node2->IthSucc(s2);
  Node *bc2 = b2->IthSucc(b2->CallSuccIndex());
  return (bc1->LastBetTo() == bc2->LastBetTo());
}
bool TwoSuccsCorrespond ( Node * node1 , int s1 , Node * node2 , int s2 ) { bool is_call_succ1 = ( s1 == node1 -> CallSuccIndex ( ) ) ; bool is_call_succ2 = ( s2 == node2 -> CallSuccIndex ( ) ) ; if ( is_call_succ1 && is_call_succ2 ) return true ; if ( is_call_succ1 || is_call_succ2 ) return false ; bool is_fold_succ1 = ( s1 == node1 -> FoldSuccIndex ( ) ) ; bool is_fold_succ2 = ( s2 == node2 -> FoldSuccIndex ( ) ) ; if ( is_fold_succ1 && is_fold_succ2 ) return true ; if ( is_fold_succ1 || is_fold_succ2 ) return false ; Node * b1 = node1 -> IthSucc ( s1 ) ; Node * bc1 = b1 -> IthSucc ( b1 -> CallSuccIndex ( ) ) ; Node * b2 = node2 -> IthSucc ( s2 ) ; Node * bc2 = b2 -> IthSucc ( b2 -> CallSuccIndex ( ) ) ; return ( bc1 -> LastBetTo ( ) == bc2 -> LastBetTo ( ) ) ; }
Two succs correspond if they are both call succs
Two succs correspond if they are both fold succs
Two succs correspond if they are both bet succs and the bet size is the
same.
Two succs correspond if they are both call succs Two succs correspond if they are both fold succs Two succs correspond if they are both bet succs and the bet size is the same .