All Packages Class Hierarchy This Package Previous Next Index
Class sim.ForExperiment
java.lang.Object
|
+----sim.Experiment
|
+----sim.ForExperiment
- public class ForExperiment
- extends Experiment
This object sets up a series of experiments to be run.
This object takes as its parameters the name of a variable to
change in each experiment, the initial and final values of the
variable, the increment, and the experiment to run.
This code is (c) 1996 Mance E. Harmon
<harmonme@aa.wpafb.af.mil>,
http://www.cs.cmu.edu/~baird
The source and object code may be redistributed freely.
If the code is modified, please state so in the comments.
- Version:
- 1.01, 1 July 97
- Author:
- Mance E. Harmon
-
experiment
- This experiment to be run.
-
finalVal
- the final value of the index
-
increment
- the increment to the variable
-
index
- this is used to graph the error vs.
-
initVal
- the initial value of the index
-
variable
- this name of the variable to used as the index
-
ForExperiment()
-
-
BNF(int)
-
-
initialize(int)
- Initialize, either partially or completely.
-
parse(Parser, int)
- Parse the input file to get the parameters for this object.
-
run()
- This runs the simulation.
-
setWatchManager(WatchManager, String)
- Register all variables with this WatchManager.
-
unparse(Unparser, int)
- Output a description of this object that can be parsed with parse().
experiment
protected Experiment experiment
- This experiment to be run.
finalVal
protected NumExp finalVal
- the final value of the index
increment
protected NumExp increment
- the increment to the variable
initVal
protected NumExp initVal
- the initial value of the index
variable
protected PString variable
- this name of the variable to used as the index
index
protected Pointer index
- this is used to graph the error vs. index
ForExperiment
public ForExperiment()
setWatchManager
public void setWatchManager(WatchManager wm,
String name)
- Register all variables with this WatchManager.
This will be called after all parsing is done.
setWatchManager should be overridden and forced to
call the same method on all the other objects in the experiment.
- Overrides:
- setWatchManager in class Experiment
BNF
public String BNF(int lang)
- Overrides:
- BNF in class Experiment
unparse
public void unparse(Unparser u,
int lang)
- Output a description of this object that can be parsed with parse().
- Overrides:
- unparse in class Experiment
- See Also:
- Parsable
parse
public Object parse(Parser p,
int lang) throws ParserException
- Parse the input file to get the parameters for this object.
- Throws: ParserException
- parser didn't find the required token
- Overrides:
- parse in class Experiment
run
public void run()
- This runs the simulation. The function returns when the simulation
is completely done. As the simulation is running, it should call
the watchManager.update() function periodically so all the display
windows can be updated.
- Overrides:
- run in class Experiment
initialize
public void initialize(int level)
- Initialize, either partially or completely.
- Overrides:
- initialize in class Experiment
- See Also:
- initialize
All Packages Class Hierarchy This Package Previous Next Index