All Implemented Interfaces:
Algorithm, ReturnsBootstrapGraphs, HasParameters, TakesExternalGraph, TetradSerializable, Serializable

R2.
Version:
$Id: $Id
Author:
josephramsey
See Also:
  • Constructor Details

    • R2

      public R2()

      Constructor for R2.

    • R2

      public R2(Algorithm algorithm)

      Constructor for R2.

      Parameters:
      algorithm - a Algorithm object
  • Method Details

    • runSearch

      public Graph runSearch(DataModel dataModel, Parameters parameters)
      Runs the search algorithm using the provided data model and parameters.
      Parameters:
      dataModel - The data model containing the dataset to search.
      parameters - The parameters to be used for the search algorithm.
      Returns:
      The graph result of the search algorithm.
      Throws:
      IllegalArgumentException - if the data model is not a continuous dataset, or if the search algorithm does not find a graph result.
    • getComparisonGraph

      public Graph getComparisonGraph(Graph graph)
      Returns a comparison graph for the given true directed graph.
      Specified by:
      getComparisonGraph in interface Algorithm
      Parameters:
      graph - The true directed graph, if there is one.
      Returns:
      A comparison graph representing the true directed graph.
    • getDescription

      public String getDescription()
      Returns the description of the algorithm.
      Specified by:
      getDescription in interface Algorithm
      Returns:
      The description of the algorithm.
    • getDataType

      public DataType getDataType()
      Returns the data type required for the search, whether continuous, discrete, or mixed.
      Specified by:
      getDataType in interface Algorithm
      Returns:
      The data type required for the search.
    • getParameters

      public List<String> getParameters()
      Retrieves the list of parameters for the current instance of the class.
      Specified by:
      getParameters in interface HasParameters
      Returns:
      A list of parameter names used by the algorithm. If the algorithm does not have any parameters, an empty list is returned.
    • setExternalGraph

      public void setExternalGraph(Algorithm algorithm)
      Sets the external graph for the algorithm.
      Specified by:
      setExternalGraph in interface TakesExternalGraph
      Parameters:
      algorithm - a Algorithm object representing the external graph to be set
      Throws:
      IllegalArgumentException - if the algorithm is null