examples/cpp/sports_scheduling.cc
void ComputeOneDayOneTeamTuples(int num_teams, IntTupleSet* const tuples) {
  for (int home_away = 0; home_away <= 1; ++home_away) {
    for (int opponent = 0; opponent < num_teams; ++opponent) {
      tuples->Insert3(opponent, home_away, opponent + home_away * num_teams);
    }
  }
}
// Computes the tuple set that links opponents, home_away, and
// signed_opponent on a single day for a single team.
Computes the tuple set that links opponents, home_away, and
signed_opponent on a single day for a single team.
Computes the tuple set that links opponents home_away and signed_opponent on a single day for a single team .
void ComputeOneDayOneTeamTuples(int num_teams, IntTupleSet* const tuples) {
  for (int home_away = 0; home_away <= 1; ++home_away) {
    for (int opponent = 0; opponent < num_teams; ++opponent) {
      tuples->Insert3(opponent, home_away, opponent + home_away * num_teams);
    }
  }
}
void ComputeOneDayOneTeamTuples ( int num_teams , IntTupleSet * const tuples ) { for ( int home_away = 0 ; home_away <= 1 ; ++ home_away ) { for ( int opponent = 0 ; opponent < num_teams ; ++ opponent ) { tuples -> Insert3 ( opponent , home_away , opponent + home_away * num_teams ) ; } } }
Computes the tuple set that links opponents, home_away, and
signed_opponent on a single day for a single team.
Computes the tuple set that links opponents home_away and signed_opponent on a single day for a single team .