de.cau.cs.kieler.synccharts.codegen.sc
Class PriorityOptimizer

java.lang.Object
  extended by de.cau.cs.kieler.synccharts.codegen.sc.PriorityOptimizer

public class PriorityOptimizer
extends Object

A class to optimize the priority numbers of a given SC-File. The optimization includes only the reduction of used integers.

Rating yellow
(2010-06-14)

Constructor Summary
PriorityOptimizer(File f)
          Constructor that sets the file.
 
Method Summary
 int getMaxThreadPrio()
          Returns the maximal number of thread id's.
 void optimize()
          Starts the optimization of the given file and replaces all unoptimized priorities.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PriorityOptimizer

public PriorityOptimizer(File f)
Constructor that sets the file.

Parameters:
f - file to optimize priorities for
Method Detail

optimize

public void optimize()
              throws IOException
Starts the optimization of the given file and replaces all unoptimized priorities.

Throws:
IOException - if file does not exist

getMaxThreadPrio

public int getMaxThreadPrio()
Returns the maximal number of thread id's.

Returns:
max thread id