edu.bonn.cs.iv.bonnmotion.apps
Class Statistics

java.lang.Object
  extended by edu.bonn.cs.iv.bonnmotion.App
      extended by edu.bonn.cs.iv.bonnmotion.apps.Statistics

public class Statistics
extends App

Application that calculates various statistics for movement scenarios.


Field Summary
protected  int flags
           
protected  java.lang.String name
           
protected static boolean printTime
           
protected  double[] radius
           
protected static double secG
           
protected static double secM
           
protected static double secN
           
protected static double secP
           
protected static double secS
           
protected static double secU
           
static int STATS_MINCUT
           
static int STATS_NODEDEG
           
static int STATS_PARTDEG
           
static int STATS_PARTITIONS
           
static int STATS_STABILITY
           
static int STATS_UNIDIRECTIONAL
           
 
Constructor Summary
Statistics(java.lang.String[] args)
           
 
Method Summary
 void go(java.lang.String[] _args)
          Main method from where all the magic starts ...
static void main(java.lang.String[] args)
           
static void overall(Scenario s, double[] radius, java.lang.String basename)
          Calculate statistics averaged over the whole simulation time.
protected  boolean parseArg(char key, java.lang.String val)
           
protected static void pmerge(int[] idx, int[] size, int i, int j)
          Helper function for overall(), merge two partitions.
static void printHelp()
           
static void progressive(int nodes, double duration, edu.bonn.cs.iv.util.Heap sched, boolean bidirectional, int which, java.lang.String basename)
          Calculates statistics' devolution over time.
static double schedule(Scenario s, edu.bonn.cs.iv.util.Heap sched, double radius, boolean calculateMobility)
          Put LinkStatusChange-events into a heap.
 
Methods inherited from class edu.bonn.cs.iv.bonnmotion.App
exceptionHandler, openPrintWriter, parse, parseArg, parseDoubleArray, parseIntArray, parseStringArray, stringArrayConcat
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATS_NODEDEG

public static final int STATS_NODEDEG
See Also:
Constant Field Values

STATS_PARTITIONS

public static final int STATS_PARTITIONS
See Also:
Constant Field Values

STATS_MINCUT

public static final int STATS_MINCUT
See Also:
Constant Field Values

STATS_STABILITY

public static final int STATS_STABILITY
See Also:
Constant Field Values

STATS_UNIDIRECTIONAL

public static final int STATS_UNIDIRECTIONAL
See Also:
Constant Field Values

STATS_PARTDEG

public static final int STATS_PARTDEG
See Also:
Constant Field Values

secP

protected static double secP

secM

protected static double secM

secN

protected static double secN

secS

protected static double secS

secU

protected static double secU

secG

protected static double secG

printTime

protected static boolean printTime

name

protected java.lang.String name

radius

protected double[] radius

flags

protected int flags
Constructor Detail

Statistics

public Statistics(java.lang.String[] args)
           throws java.io.FileNotFoundException,
                  java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException
Method Detail

go

public void go(java.lang.String[] _args)
        throws java.io.FileNotFoundException,
               java.io.IOException
Description copied from class: App
Main method from where all the magic starts ...

Specified by:
go in class App
Throws:
java.io.FileNotFoundException
java.io.IOException

progressive

public static void progressive(int nodes,
                               double duration,
                               edu.bonn.cs.iv.util.Heap sched,
                               boolean bidirectional,
                               int which,
                               java.lang.String basename)
                        throws java.io.FileNotFoundException,
                               java.io.IOException
Calculates statistics' devolution over time.

Throws:
java.io.FileNotFoundException
java.io.IOException

schedule

public static double schedule(Scenario s,
                              edu.bonn.cs.iv.util.Heap sched,
                              double radius,
                              boolean calculateMobility)
Put LinkStatusChange-events into a heap.


pmerge

protected static void pmerge(int[] idx,
                             int[] size,
                             int i,
                             int j)
Helper function for overall(), merge two partitions.


overall

public static void overall(Scenario s,
                           double[] radius,
                           java.lang.String basename)
                    throws java.io.FileNotFoundException
Calculate statistics averaged over the whole simulation time.

Throws:
java.io.FileNotFoundException

parseArg

protected boolean parseArg(char key,
                           java.lang.String val)
Overrides:
parseArg in class App

printHelp

public static void printHelp()

main

public static void main(java.lang.String[] args)
                 throws java.io.FileNotFoundException,
                        java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException