swarm.analysis
Interface EZGraph

All Known Implementing Classes:
EZGraphImpl

public interface EZGraph
extends SwarmObject, SwarmObjectS, GUIComposite, GUICompositeS

A class for easily create graphs.. This class allows the user to easily create graphs of various quantities in the model s/he is investigating. The user first creates the EZGraph, and then creates "Sequences"; (lines) which will appear in the graph. The sequences are generated based on data provided by a single object or a collection of target objects, in reponse to a specified selector. One of the features of the EZGraph is that it will automatically generate average, total, min, max and count sequences without the user having to mess with Averagers amd other low-level classes.


Method Summary
 EZAverageSequence createAverageSequence$withFeedFrom$andSelector(java.lang.String aName, java.lang.Object aCollection, Selector aSel)
          The createAverageSequence method takes a collection of objects and generates a sequence based on the average over the responses of the entire object set.
 EZAverageSequence createCountSequence$withFeedFrom$andSelector(java.lang.String aName, java.lang.Object aCollection, Selector aSel)
          The createCountSequence method takes a collection of objects and generates a sequence based on the count over the responses of the entire object set.
 EZAverageSequence createMaxSequence$withFeedFrom$andSelector(java.lang.String aName, java.lang.Object aCollection, Selector aSel)
          The createMaxSequence method takes a collection of objects and generates a sequence based on the maximums over the responses of the entire object set.
 EZAverageSequence createMinSequence$withFeedFrom$andSelector(java.lang.String aName, java.lang.Object aCollection, Selector aSel)
          The createMinSequence method takes a collection of objects and generates a sequence based on the minimum over the responses of the entire object set.
 EZAverageSequence createMovingAverageSequence$withFeedFrom$andSelector$andWidth(java.lang.String aName, java.lang.Object aTarget, Selector aSel, int width)
          The createMovingAverageSequence method takes a single object, or collection of objects and generates a sequence based on the average over the responses of the entire object set for a given width chunk of samples.
 EZAverageSequence createMovingStdDevSequence$withFeedFrom$andSelector$andWidth(java.lang.String aName, java.lang.Object aTarget, Selector aSel, int width)
          The createMovingStdDevSequence method takes a single object, or collection of objects and generates a sequence based on the variance over the responses of the entire object set for a given width chunk of samples.
 EZAverageSequence createMovingVarianceSequence$withFeedFrom$andSelector$andWidth(java.lang.String aName, java.lang.Object aTarget, Selector aSel, int width)
          The createMovingVarianceSequence method takes a single object, or collection of objects and generates a sequence based on the variance over the responses of the entire object set for a given width chunk of samples.
 EZSequence createSequence$withFeedFrom$andSelector(java.lang.String aName, java.lang.Object anObj, Selector aSel)
          The createSequence method creates a sequence in the EZGraph based on the return value provided by the object anObj when sent the selector aSel.
 EZAverageSequence createStdDevSequence$withFeedFrom$andSelector(java.lang.String aName, java.lang.Object aCollection, Selector aSel)
          The createStdDevSequence method takes a collection of objects and generates a sequence based on the sample variance over the responses of the entire object set.
 EZAverageSequence createTotalSequence$withFeedFrom$andSelector(java.lang.String aName, java.lang.Object aCollection, Selector aSel)
          The createTotalSequence method takes a collection of objects and generates a sequence based on the sum over the responses of the entire object set.
 EZAverageSequence createVarianceSequence$withFeedFrom$andSelector(java.lang.String aName, java.lang.Object aCollection, Selector aSel)
          The createVarianceSequence method takes a collection of objects and generates a sequence based on the sample variance over the responses of the entire object set.
 java.lang.Object dropSequence(java.lang.Object aSeq)
          The dropSequence method drops a data sequence (line on the graph), e.g.
 java.lang.String getFileName()
          Return the file name prefix string.
 Graph getGraph()
          The getGraph method lets the user access the graph generated internally by the EZGraph.
 java.lang.String getTitle()
          Return the title string.
 void outputGraph()
          the outputGraph method updates the graph with the data obtained from the last call to -update.
 void outputToFile()
          the outputToFile method sends to the disk file data obtained from the last call to -update.
 void setRangesXMin$Max(double xmin, double xmax)
          Fix the range of X values on the graph between some range.
 void setRangesYMin$Max(double ymin, double ymax)
          Fix the range of Y values on the graph between some range.
 void setScaleModeX$Y(boolean xs, boolean ys)
          Whether to autoscale every timestep or instead to jump scale.
 void step()
          The step method combines -update, -outputGraph and -outputToFile.
 void update()
          the -update method causes the underlying sequences to get the next set of data values.
 
Methods inherited from interface swarm.objectbase.SwarmObject
getCompleteProbeMap, getProbeForMessage, getProbeForVariable, getProbeMap
 
Methods inherited from interface swarm.simtoolsgui.GUIComposite
disableDestroyNotification, enableDestroyNotification$notificationMethod
 
Methods inherited from interface swarm.defobj.Drop
drop
 
Methods inherited from interface swarm.defobj.DefinedObject
compare, describe, describeID, getDisplayName, getTypeName, getZone, perform, perform$with, perform$with$with, perform$with$with$with, respondsTo, setDisplayName, xfprint, xfprintid, xprint, xprintid
 
Methods inherited from interface swarm.defobj.GetName
getName
 

Method Detail

setRangesXMin$Max

public void setRangesXMin$Max(double xmin,
                              double xmax)
Fix the range of X values on the graph between some range.

setRangesYMin$Max

public void setRangesYMin$Max(double ymin,
                              double ymax)
Fix the range of Y values on the graph between some range.

setScaleModeX$Y

public void setScaleModeX$Y(boolean xs,
                            boolean ys)
Whether to autoscale every timestep or instead to jump scale.

getGraph

public Graph getGraph()
The getGraph method lets the user access the graph generated internally by the EZGraph. (Only relevant if the state of setGraphics is set to 1.)

createSequence$withFeedFrom$andSelector

public EZSequence createSequence$withFeedFrom$andSelector(java.lang.String aName,
                                                          java.lang.Object anObj,
                                                          Selector aSel)
The createSequence method creates a sequence in the EZGraph based on the return value provided by the object anObj when sent the selector aSel. If file I/O is enabled, then the data will be sent to a file with the name aName, otherwise the aName argument is simply used as the legend for the graph element generated by EZGraph. The method returns an id which can be used later with -dropSequence.

createAverageSequence$withFeedFrom$andSelector

public EZAverageSequence createAverageSequence$withFeedFrom$andSelector(java.lang.String aName,
                                                                        java.lang.Object aCollection,
                                                                        Selector aSel)
The createAverageSequence method takes a collection of objects and generates a sequence based on the average over the responses of the entire object set. The method returns an id which can be used later with -dropSequence.

createMovingAverageSequence$withFeedFrom$andSelector$andWidth

public EZAverageSequence createMovingAverageSequence$withFeedFrom$andSelector$andWidth(java.lang.String aName,
                                                                                       java.lang.Object aTarget,
                                                                                       Selector aSel,
                                                                                       int width)
The createMovingAverageSequence method takes a single object, or collection of objects and generates a sequence based on the average over the responses of the entire object set for a given width chunk of samples. The method returns an id which can be used later with -dropSequence.

createVarianceSequence$withFeedFrom$andSelector

public EZAverageSequence createVarianceSequence$withFeedFrom$andSelector(java.lang.String aName,
                                                                         java.lang.Object aCollection,
                                                                         Selector aSel)
The createVarianceSequence method takes a collection of objects and generates a sequence based on the sample variance over the responses of the entire object set. The method returns an id which can be used later with -dropSequence.

createMovingVarianceSequence$withFeedFrom$andSelector$andWidth

public EZAverageSequence createMovingVarianceSequence$withFeedFrom$andSelector$andWidth(java.lang.String aName,
                                                                                        java.lang.Object aTarget,
                                                                                        Selector aSel,
                                                                                        int width)
The createMovingVarianceSequence method takes a single object, or collection of objects and generates a sequence based on the variance over the responses of the entire object set for a given width chunk of samples. The method returns an id which can be used later with -dropSequence.

createStdDevSequence$withFeedFrom$andSelector

public EZAverageSequence createStdDevSequence$withFeedFrom$andSelector(java.lang.String aName,
                                                                       java.lang.Object aCollection,
                                                                       Selector aSel)
The createStdDevSequence method takes a collection of objects and generates a sequence based on the sample variance over the responses of the entire object set. The method returns an id which can be used later with -dropSequence.

createMovingStdDevSequence$withFeedFrom$andSelector$andWidth

public EZAverageSequence createMovingStdDevSequence$withFeedFrom$andSelector$andWidth(java.lang.String aName,
                                                                                      java.lang.Object aTarget,
                                                                                      Selector aSel,
                                                                                      int width)
The createMovingStdDevSequence method takes a single object, or collection of objects and generates a sequence based on the variance over the responses of the entire object set for a given width chunk of samples. The method returns an id which can be used later with -dropSequence.

createTotalSequence$withFeedFrom$andSelector

public EZAverageSequence createTotalSequence$withFeedFrom$andSelector(java.lang.String aName,
                                                                      java.lang.Object aCollection,
                                                                      Selector aSel)
The createTotalSequence method takes a collection of objects and generates a sequence based on the sum over the responses of the entire object set. The method returns an id which can be used later with -dropSequence.

createMinSequence$withFeedFrom$andSelector

public EZAverageSequence createMinSequence$withFeedFrom$andSelector(java.lang.String aName,
                                                                    java.lang.Object aCollection,
                                                                    Selector aSel)
The createMinSequence method takes a collection of objects and generates a sequence based on the minimum over the responses of the entire object set. The method returns an id which can be used later with -dropSequence.

createMaxSequence$withFeedFrom$andSelector

public EZAverageSequence createMaxSequence$withFeedFrom$andSelector(java.lang.String aName,
                                                                    java.lang.Object aCollection,
                                                                    Selector aSel)
The createMaxSequence method takes a collection of objects and generates a sequence based on the maximums over the responses of the entire object set. The method returns an id which can be used later with -dropSequence.

createCountSequence$withFeedFrom$andSelector

public EZAverageSequence createCountSequence$withFeedFrom$andSelector(java.lang.String aName,
                                                                      java.lang.Object aCollection,
                                                                      Selector aSel)
The createCountSequence method takes a collection of objects and generates a sequence based on the count over the responses of the entire object set. The method returns an id which can be used later with -dropSequence.

dropSequence

public java.lang.Object dropSequence(java.lang.Object aSeq)
The dropSequence method drops a data sequence (line on the graph), e.g. because the source object no longer exists. The aSeq parameter should be an id previously returned by one of the createSequence: methods. If the drop is successful, the method returns aSeq, otherwise it returns nil.

getTitle

public java.lang.String getTitle()
Return the title string.

getFileName

public java.lang.String getFileName()
Return the file name prefix string.

update

public void update()
the -update method causes the underlying sequences to get the next set of data values. If a sequence has a single object attached rather than an Averager, nothing is done.

outputGraph

public void outputGraph()
the outputGraph method updates the graph with the data obtained from the last call to -update. If setGraphics==0, nothing is done.

outputToFile

public void outputToFile()
the outputToFile method sends to the disk file data obtained from the last call to -update. If setFileOutput==0, nothing is done.

step

public void step()
The step method combines -update, -outputGraph and -outputToFile. If you want file output to occur at a different frequency than graph updates, schedule those methods separately instead of using -step.