Class SingleDatasetSimulation
java.lang.Object
edu.cmu.tetrad.algcomparison.simulation.SingleDatasetSimulation
- All Implemented Interfaces:
Simulation,HasParameters,TetradSerializable,Serializable
A
Simulation implementation that returns a single supplied data set.- Author:
- josephramsey
- See Also:
-
Field Summary
Fields inherited from interface edu.cmu.tetrad.algcomparison.simulation.Simulation
serialVersionUID -
Constructor Summary
ConstructorsConstructorDescriptionSingleDatasetSimulation(DataSet dataSet) ASimulationimplementation that returns a single supplied data set. -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateData(Parameters parameters, boolean newModel) Creates a new data model for the simulation.getDataModel(int index) Retrieves the data model at the specified index from this simulation.Retrieves the data type of the data set.Returns the description of the simulation.intReturns the number of data models (1).Returns the list of parameters used in the simulation.Class<? extends RandomGraph> Returns null, as there is not random graph for this simulation.Class<? extends Simulation> Retrieves the class of the simulation.getTrueGraph(int index) Gets the true graph for the simulation at the specified index.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.cmu.tetrad.algcomparison.simulation.Simulation
getShortName
-
Constructor Details
-
SingleDatasetSimulation
ASimulationimplementation that returns a single supplied data set.- Parameters:
dataSet- The data set to return.
-
-
Method Details
-
createData
Creates a new data model for the simulation.- Specified by:
createDatain interfaceSimulation- Parameters:
parameters- the parameters for creating the data modelnewModel- a flag indicating whether to create a new model
-
getNumDataModels
public int getNumDataModels()Returns the number of data models (1).- Specified by:
getNumDataModelsin interfaceSimulation- Returns:
- The number of data models.
-
getTrueGraph
Gets the true graph for the simulation at the specified index.- Specified by:
getTrueGraphin interfaceSimulation- Parameters:
index- The index of the desired true graph; must be 0.- Returns:
- null, since there is no true graph for this simulation.
-
getDataModel
Retrieves the data model at the specified index from this simulation.- Specified by:
getDataModelin interfaceSimulation- Parameters:
index- The index of the desired data model (must be 0).- Returns:
- The data model at the specified index.
- Throws:
IllegalArgumentException- if the index is not 0.
-
getDataType
Retrieves the data type of the data set.- Specified by:
getDataTypein interfaceSimulation- Returns:
- The data type of the data set, which can be continuous, discrete, or mixed.
- Throws:
IllegalStateException- If the data type is unknown.
-
getDescription
Returns the description of the simulation.- Specified by:
getDescriptionin interfaceSimulation- Returns:
- Returns a one-line description of the simulation, to be printed at the beginning of the report.
-
getParameters
Returns the list of parameters used in the simulation.- Specified by:
getParametersin interfaceHasParameters- Specified by:
getParametersin interfaceSimulation- Returns:
- The list of parameters used in the simulation.
-
getRandomGraphClass
Returns null, as there is not random graph for this simulation.- Specified by:
getRandomGraphClassin interfaceSimulation- Returns:
- null.
-
getSimulationClass
Retrieves the class of the simulation. This method is used to retrieve the class of a simulation based on the selected simulations in the model.- Specified by:
getSimulationClassin interfaceSimulation- Returns:
- The class of the simulation.
-