Example #1
0
File: ST.C Project: eholk/pbbs
 bool commit(intT i) {
   if (R[v].check(i)) { 
     R[u].checkReset(i);
     UF.link(v, u); 
     return 1; }
   else if (R[u].check(i)) {
     UF.link(u, v);
     return 1; }
   else return 0;
 }
Example #2
0
 bool commit(int i) {
   if (checkLoc(R[v], i)) { 
     if (checkLoc(R[u], i)) resetLoc(R[u]);
     UF.link(v, u); 
     return 1; }
   else if (checkLoc(R[u], i)) {
     UF.link(u, v);
     return 1; }
   else return 0;
 }
Example #3
0
File: ST.C Project: eholk/pbbs
 bool reserve(intT i) {
   u = UF.find(E[i].u);
   v = UF.find(E[i].v);
   if (u > v) {intT tmp = u; u = v; v = tmp;}
   if (u != v) {
     R[v].reserve(i);
     return 1;
   } else return 0;
 }
Example #4
0
File: ST.C Project: eholk/pbbs
 bool reserve(intT i) {
   u = UF.find(E[i].u);
   v = UF.find(E[i].v);
   if (u != v) {
     R[u].reserve(i);
     R[v].reserve(i);
     return 1;
   } else return 0;
 }
Example #5
0
 bool reserve(int i) {
   u = UF.find(E[i].u);
   v = UF.find(E[i].v);
   if (u != v) {
     reserveLoc(R[u], i);
     reserveLoc(R[v], i);
     return 1;
   } else return 0;
 }
Example #6
0
File: ST.C Project: eholk/pbbs
 bool commit(intT i) {
   if (R[v].check(i)) { UF.link(v, u); return 1; }
   else return 0;
 }