Class SimulationUtils

java.lang.Object
edu.cmu.tetrad.algcomparison.simulation.SimulationUtils

public final class SimulationUtils extends Object
Jun 4, 2019 5:21:45 PM
Version:
$Id: $Id
Author:
Kevin V. Bui (kvb2@pitt.edu)
  • Method Details

    • create

      public static Simulation create(String simulationType, RandomGraph randomGraph)
      Creates a simulation instance based on the specified simulation type and random graph. This method serves as a shorthand for calling the full create method with a null knowledge parameter.
      Parameters:
      simulationType - the type of simulation to create, which must correspond to a valid simulation type such as SimulationTypes.BAYS_NET, SimulationTypes.STRUCTURAL_EQUATION_MODEL, etc.
      randomGraph - the random graph to base the simulation on, representing the structure required for the simulation.
      Returns:
      the created simulation instance corresponding to the specified simulation type and random graph.
      Throws:
      IllegalArgumentException - if the provided simulation type is unknown or unsupported.
    • create

      public static Simulation create(String simulationType, RandomGraph randomGraph, Knowledge knowledge)
      Creates a simulation instance based on the specified simulation type, random graph, and knowledge.
      Parameters:
      simulationType - the type of simulation to create. Must be one of: SimulationTypes.BAYS_NET, SimulationTypes.LINEAR_GAUSSIAN_SEM, SimulationTypes.LINEAR_NON_GAUSSIAN_SEM, SimulationTypes.STRUCTURAL_EQUATION_MODEL (legacy name for the Linear Gaussian SEM), SimulationTypes.GENERAL_ADDITIVE_MODEL, SimulationTypes.GENERAL_NOISE_SEM, SimulationTypes.ADDITIVE_NOISE_SEM, SimulationTypes.GENERAL_STRUCTURAL_EQUATION_MODEL, SimulationTypes.LEE_AND_HASTIE, SimulationTypes.CONDITIONAL_GAUSSIAN, or SimulationTypes.TIME_SERIES.
      randomGraph - the random graph to base the simulation on.
      knowledge - additional knowledge that may be used by certain simulation types, such as SimulationTypes.TIME_SERIES. Can be null for types that do not require it.
      Returns:
      the created simulation instance corresponding to the specified simulation type.
      Throws:
      IllegalArgumentException - if the specified simulation type is unknown or unsupported.