Package umontreal.iro.lecuyer.util

Examples of umontreal.iro.lecuyer.util.PrintfFormat


      return pf.toString();
   }

   public String shortReport() {
      update();
      PrintfFormat pf = new PrintfFormat();
      pf.append (9, 2, 2, getInitTime()).append ("   ");
      pf.append (9, 2, 2, getLastTime()).append ("   ");
      pf.append (8, 3, 2, min()).append ("   ");
      pf.append (8, 3, 2, max()).append ("   ");
      pf.append (10, 3, 2, average());
      return pf.toString();
   }
View Full Code Here




   public String report()  {
      update (lastValue);
      PrintfFormat str = new PrintfFormat();
      str.append ("REPORT on Accumulate stat. collector ==> " + name);
      str.append (PrintfFormat.NEWLINE + "      from time   to time       min         max");
      str.append ("         average").append(PrintfFormat.NEWLINE);
      str.append (12, 2, 2, initTime);
      str.append (13, 2, 2, lastTime);
      str.append (11, 3, 2, minValue);
      str.append (12, 3, 2, (double)maxValue);
      str.append (14, 3, 2, (double)average()).append (PrintfFormat.NEWLINE);

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

   public String report()   {
        if (blockSojourn == null || blockSize == null)
            throw new IllegalStateException
                ("Calling report when no statistics were collected");

        PrintfFormat str = new PrintfFormat();
        str.append (PrintfFormat.NEWLINE +
            "REPORT ON LIST : ").append (name).append (PrintfFormat.NEWLINE);
        str.append ("   From time: ").append (7, 2, 2, initTime);
        str.append (" to time: ").append (10, 2, 2, sim.time());
        str.append ("                  min        max      average  ");
        str.append ("standard dev.  nb. Obs");

        str.append ("   Size    ");
        str.append (9, (int)(blockSize.min()+0.5));
        str.append (11, (int)(blockSize.max()+0.5));
        str.append (14, 3, 2, blockSize.average()).append(PrintfFormat.NEWLINE);

        str.append ("   Sojourn ");
        str.append ( 12, 3, 2, blockSojourn.min()).append (" ");
        str.append (10, 3, 2, blockSojourn.max()).append (" ");
        str.append (10, 3, 2, blockSojourn.average()).append (" ");
        str.append (10, 3, 2, blockSojourn.standardDeviation()).append (" ");
        str.append (11, blockSojourn.numberObs()).append (PrintfFormat.NEWLINE);

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

                          +"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

    *
    */
   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

   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

   
    * @return the detailed state of the generator, formatted as a string
    *
    */
   public String toStringFull()  {
       PrintfFormat str = new PrintfFormat();
       str.append ("The RandMrg");
       if (descriptor != null && descriptor.length() > 0)
          str.append (" " + descriptor);
       str.append (":" + PrintfFormat.NEWLINE + "   anti = " +
          (anti ? "true" : "false")).append(PrintfFormat.NEWLINE);

       str.append ("   Ig = { ");
       for (int i = 0; i < 5; i++)
          str.append ((long) Ig[i] + ", ");
       str.append ((long) Ig[5] + " }" + PrintfFormat.NEWLINE);

       str.append ("   Bg = { ");
       for (int i = 0; i < 5; i++)
          str.append ((long) Bg[i] + ", ");
       str.append ((long) Bg[5] + " }" + PrintfFormat.NEWLINE);

       str.append ("   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

   
    * @return the state of the generator, formated as a string
    *
    */
   public String toString()  {
      PrintfFormat str = new PrintfFormat();

      str.append ("The current state of the MRG32k3a");
      if (name != null && name.length() > 0)
         str.append (" " + name);
      str.append (":" + PrintfFormat.NEWLINE + "   Cg = { ");
      str.append ((long) Cg0 + ", ");
      str.append ((long) Cg1 + ", ");
      str.append ((long) Cg2 + ", ");
      str.append ((long) Cg3 + ", ");
      str.append ((long) Cg4 + ", ");
      str.append ((long) Cg5 + " }" + PrintfFormat.NEWLINE +
          PrintfFormat.NEWLINE);

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

   
    * @return the detailed state of the generator, formatted as a string
    *
    */
   public String toStringFull()  {
      PrintfFormat str = new PrintfFormat();
      str.append ("The MRG32k3a stream");
      if (name != null && name.length() > 0)
         str.append (" " + name);
      str.append (":" + PrintfFormat.NEWLINE + "   anti = " +
         (anti ? "true" : "false")).append(PrintfFormat.NEWLINE);
      str.append ("   prec53 = " + (prec53 ? "true" : "false")).append(PrintfFormat.NEWLINE);

      str.append ("   Ig = { ");
      for (int i = 0; i < 5; i++)
         str.append ((long) Ig[i] + ", ");
      str.append ((long) Ig[5] + " }" + PrintfFormat.NEWLINE);

      str.append ("   Bg = { ");
      for (int i = 0; i < 5; i++)
         str.append ((long) Bg[i] + ", ");
      str.append ((long) Bg[5] + " }" + PrintfFormat.NEWLINE);

      str.append ("   Cg = { ");
      str.append ((long) Cg0 + ", ");
      str.append ((long) Cg1 + ", ");
      str.append ((long) Cg2 + ", ");
      str.append ((long) Cg3 + ", ");
      str.append ((long) Cg4 + ", ");
      str.append ((long) Cg5 + " }" + PrintfFormat.NEWLINE +
          PrintfFormat.NEWLINE);

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

TOP

Related Classes of umontreal.iro.lecuyer.util.PrintfFormat

Copyright © 2018 www.massapicom. 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.