Statistics
Class LoopStatus

java.lang.Object
  extended byStatistics.LoopStatus

public class LoopStatus
extends java.lang.Object

Provides methods to report the progress of a loop and project time to completion.


Constructor Summary
LoopStatus()
           
 
Method Summary
 void progressReport(int n, int N, int m, long before)
          Reports current progress and projects time left from a loop over N iterations when the current iteration is n and displays the report in a Window.
static void progressReport(int n, int N, int m, long before, javax.swing.JProgressBar jPrgBar)
          Reports current progress and projects time left from a loop over N iterations when the current iteration is n.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoopStatus

public LoopStatus()
Method Detail

progressReport

public static void progressReport(int n,
                                  int N,
                                  int m,
                                  long before,
                                  javax.swing.JProgressBar jPrgBar)

Reports current progress and projects time left from a loop over N iterations when the current iteration is n. Progress is reported to a progress bar, no window allocated to show the progress bar.

Must be called at iteration n=m-1 for the first time (counting starts at n=0): if(n%m==m-1)progressReport(n,N,m,...)).

Parameters:
n - Current loop iteration.
N - Total number of iterations in loop.
m - Progress report is updated every m iterations.
before - System time in miliseconds before loop start.
jPrgBar - Target of progress report.

progressReport

public void progressReport(int n,
                           int N,
                           int m,
                           long before)

Reports current progress and projects time left from a loop over N iterations when the current iteration is n and displays the report in a Window.

Must be called at iteration n=m-1 for the first time (counting starts at n=0: if(n%m==m-1)progressReport(n,N,m,...)).

Parameters:
n - Current loop iteration.
N - Total number of iterations in loop.
m - Progress report is updated every m iterations.
before - System time in miliseconds before loop start.