Class SimulationStudy

java.lang.Object
edu.cmu.tetrad.session.SimulationStudy

public final class SimulationStudy extends Object
Runs a simulation edu.cmu.tetrad.study for a session which traverses a subtree of the session graph in depth-first order and executes each node encountered a specified number of times.
Author:
josephramsey
  • Constructor Details

    • SimulationStudy

      public SimulationStudy(Session session)
      Constructs a new simulation edu.cmu.tetrad.study for the given session.
  • Method Details

    • getRepetition

      public static int getRepetition(SessionNode node)
      Gets the repeition of the given node. If the repetition of a node has not been set, it is assumed to be 1.
      See Also:
    • getDescendants

      public static Set getDescendants(SessionNode node)
    • setRepetition

      public void setRepetition(SessionNode node, int repetition)
      Sets the number of times the given node (and all of its children) will be executed each time it is encountered in a depth first traversal of the tree.
      Parameters:
      repetition - the repetition, an integer > 0.
    • execute

      public void execute(SessionNode sessionNode, boolean overwrite)
      Executes the given node the specified number of times.
      See Also:
    • createDescendantModels

      public boolean createDescendantModels(SessionNode sessionNode, boolean overwrite)
    • addSessionListener

      public void addSessionListener(SessionListener l)
      Adds a session listener.
    • getSession

      public Session getSession()