|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
generator.engin.GeneratorEngine
public class GeneratorEngine
Generator Engine
The engine performs the random system generation. Two types of system can be created : finite state space or continuous state space (LMP). The system is directly created into the file to save memory.Copyright(c) 2005 Université Laval, LSFM research group.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static int |
FINITE_STATES
Defines a finite states generation |
static int |
LMP
Defines a LMP generation mode |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
GeneratorEngine(RandomizedModel randomizedModel,
java.io.File outputFile,
ProgressDialog progress)
Creates a generic generation engine. |
Method Summary | |
---|---|
void |
addListener(GeneratorEngineListener listener)
This method attaches a listener to the engine |
java.util.ArrayList |
bagOfActions(int numberOfElements)
Returns a subset of A containing numberOfElements elements |
void |
generateActions()
This function generates the labels for the actions |
void |
generateIntervals()
This method generates the X and Y interval set from a supplied randomizedModel. |
void |
generateTransitions()
This function generates the transitions of the system |
void |
generateTransitionsForX(Interval x,
int tNumber)
This method generates all transitions for an interval x from X. |
java.io.File |
getLastGeneratedFile()
This method returns the last succesfully generated file |
Interval |
getStates()
Returns the state set of the system. |
IntervalListNoUnion |
getX()
Returns the domain of the transitions (also known as the X set). |
IntervalListNoUnion |
getY()
Returns the image of the transitions (also known as the Y set). |
void |
removeListener(GeneratorEngineListener listener)
This method removes a listener from the engine |
void |
run()
This where the generation occurs. |
void |
setMode(int generationMode)
This function sets the generator mode. |
void |
writeHeader()
This method write the file header |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int LMP
public static final int FINITE_STATES
Constructor Detail |
---|
public GeneratorEngine(RandomizedModel randomizedModel, java.io.File outputFile, ProgressDialog progress) throws ParameterException
randomizedModel
- The parameters set for the system to generateoutputFile
- The file onto which the model will be writtenprogress
- the progress dialog to update
ParameterException
- should no model of file have been providedMethod Detail |
---|
public void setMode(int generationMode)
generationMode
- mode of generation (finite or continuous state space)public java.io.File getLastGeneratedFile()
public void addListener(GeneratorEngineListener listener)
listener
- the listener to addpublic void removeListener(GeneratorEngineListener listener)
listener
- the listener to removepublic void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void generateIntervals()
public void generateActions()
public void writeHeader()
public void generateTransitions()
public void generateTransitionsForX(Interval x, int tNumber)
x
- : The interval x for which to generate transitions.tNumber
- : The number of transitions to generate.public IntervalListNoUnion getX()
public IntervalListNoUnion getY()
public Interval getStates()
public java.util.ArrayList bagOfActions(int numberOfElements) throws ParameterException
numberOfElements
- the number of elements to choose from A.
ParameterException
- if numberOfElements is greater than the
number of elements inside A.
ParameterException
- if numberOfElements is negative.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |