コード例 #1
0
 @Override
 public void prob1step(
     BitSet subset, BitSet u, BitSet v, boolean forall1, boolean forall2, BitSet result) {
   boolean b1, b2, b3;
   for (int i : new IterableStateSet(subset, numStates)) {
     b1 = forall1; // there exists or for all player 1 choices
     for (DistributionSet distrs : trans.get(i)) {
       b2 = forall2; // there exists or for all player 2 choices
       for (Distribution distr : distrs) {
         b3 = distr.containsOneOf(v) && distr.isSubsetOf(u);
         if (forall2) {
           if (!b3) b2 = false;
         } else {
           if (b3) b2 = true;
         }
       }
       if (forall1) {
         if (!b2) b1 = false;
       } else {
         if (b2) b1 = true;
       }
     }
     result.set(i, b1);
   }
 }
コード例 #2
0
 @Override
 public boolean someSuccessorsInSet(int s, BitSet set) {
   for (DistributionSet distrs : trans.get(s)) {
     for (Distribution distr : distrs) {
       if (distr.isSubsetOf(set)) return true;
     }
   }
   return false;
 }