ca.cas.control
Class SampleDriver

java.lang.Object
  extended by ca.cas.control.SampleDriver

public class SampleDriver
extends java.lang.Object

SampleDriver is an example of a class which uses classes defined for the cas application to run a simulation. The driver accepts objects which have been created according to specifications for a particular experiment. Once all of the objects necessary for the simulation have been set by a controller class, the driver's simulate method may be called.


Constructor Summary
SampleDriver()
           
 
Method Summary
 AbGraph mostRecentAbGraph()
          Returns the AbGraph used in the most recent call to simulate
 void setGenome(Genome gen)
           
 void setGeometry(Geometry geo)
           
 void setIrradiator(Irradiator irr)
           
 void setMisrejoiner(Misrejoiner mis)
           
 void setPaint(Paint pai)
           
 FinalPattern simulate(java.util.Random rand)
          This method runs a cas simulation using the objects provided using the set methods.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampleDriver

public SampleDriver()
Method Detail

simulate

public FinalPattern simulate(java.util.Random rand)
                      throws java.lang.Exception
This method runs a cas simulation using the objects provided using the set methods.

Parameters:
rand - a Random object
Returns:
a FinalPattern which reflects the results of the simulation
Throws:
java.lang.Exception

setGenome

public void setGenome(Genome gen)

setGeometry

public void setGeometry(Geometry geo)

setIrradiator

public void setIrradiator(Irradiator irr)

setMisrejoiner

public void setMisrejoiner(Misrejoiner mis)

setPaint

public void setPaint(Paint pai)

mostRecentAbGraph

public AbGraph mostRecentAbGraph()
Returns the AbGraph used in the most recent call to simulate

Returns:
an AbGraph with Breaks added to it.