Examples of PrintfFormat


Examples of umontreal.iro.lecuyer.util.PrintfFormat

                          +"for which setStatCollecting (true) has not been called");

    Accumulate sizeWait = waitingList.statSize();
    Tally sojWait = waitingList.statSojourn();

    PrintfFormat str = new PrintfFormat();

    str.append ("REPORT ON BIN : ").append (name).append (PrintfFormat.NEWLINE);
    str.append ("   From time : ").append (7, 2, 2, initStatTime);
    str.append ("   to time : ");
    str.append (10,2, 2, sim.time());
    str.append (PrintfFormat.NEWLINE + "                    min        max     average  ");
    str.append ("standard dev.  nb. obs.");

    str.append (PrintfFormat.NEWLINE + "   Available tokens ");
    str.append (8, (int)(statAvail.min()+0.5));
    str.append (11, (int)(statAvail.max()+0.5));
    str.append (12, 3, 2, statAvail.average());

    str.append (PrintfFormat.NEWLINE + "   Queue Size  ");
    str.append (8, (int)(sizeWait.min()+0.5));
    str.append (11, (int)(sizeWait.max()+0.5));
    str.append (12, 3, 2, sizeWait.average());

    str.append (PrintfFormat.NEWLINE + "   Wait    ");
    str.append (12, 3, 2, sojWait.min()).append (' ');
    str.append (10, 3, 2, sojWait.max()).append (' ');
    str.append (11, 3, 2, sojWait.average()).append (' ');
    str.append (10, 3, 2, sojWait.standardDeviation());
    str.append (10, sojWait.numberObs());

    return str.toString();
   }
View Full Code Here

Examples of umontreal.iro.lecuyer.util.PrintfFormat

    *
    */
   public static String formatp3 (String testName, double x, double p) {
      final String SLT = "Significance level of test";
      int l = Math.max (SLT.length(), testName.length());
      PrintfFormat pf = new PrintfFormat();
      pf.append (-l, testName).append (" : ").append (8, 2, 1, x).append
               (PrintfFormat.NEWLINE);
      pf.append (-l, SLT).append (" : ").append (formatp0 (p));
      if (p < SUSPECTP || p > 1.0 - SUSPECTP)
         pf.append ("    *****");
      pf.append (PrintfFormat.NEWLINE + PrintfFormat.NEWLINE);
      return pf.toString();
   }
View Full Code Here

Examples of umontreal.iro.lecuyer.util.PrintfFormat

   public double[] getState()  {
      return Cg;
   }

   public String toString() {
       PrintfFormat str = new PrintfFormat();
      
       str.append ("The current state of the RandMrg");
       if (descriptor != null && descriptor.length() > 0)
          str.append (" " + descriptor);
       str.append (":" + PrintfFormat.NEWLINE + "   Cg = { ");
       for (int i = 0; i < 5; i++)
          str.append ((long) Cg[i] + ", ");
       str.append ((long) Cg[5] + " }" + PrintfFormat.NEWLINE +
              PrintfFormat.NEWLINE);
    
       return str.toString();
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.