Exemple #1
0
int main(){
   int
      ipc,
      ios,
      uli,
      apc,
      eac,
      ipcAver=0,
      iosAver=0,
      uliAver=0,
      apcAver=0,
      eacAver=0,
      done = 0,
      cnt = 0;  // counting entries
   while (!done){
      getMarks(&ipc, &ios, &uli, &apc, &eac);
      cnt++;
      ipcAver += ipc;
      apcAver += apc;
      uliAver += uli;
      iosAver += ios;
      eacAver += eac;
      done = stopEntry();
   }
   ipcAver = ipcAver / cnt;
   iosAver /= cnt;
   uliAver /= cnt;
   apcAver /= cnt;
   eacAver /= cnt;
   prnStat(ipcAver, iosAver, uliAver, apcAver, eacAver);
   return 0;
}
bool GraphConjugacyProblem::weHaveTheSameCycles(
     int *leftMarks, const DCGState& leftState,
     int *rightMarks, const DCGState& rightState ) const
{
  int leftValue, rightValue;
  getMarks(leftMarks, leftState, rightMarks, rightState,
	   leftValue, rightValue);
  return( leftValue != 0 && leftValue == rightValue );
}