Example #1
0
  public TimeLagGraphWrapper(GraphWrapper graphWrapper) {
    if (graphWrapper == null) {
      throw new NullPointerException("No graph wrapper.");
    }

    TimeLagGraph graph = new TimeLagGraph();

    Graph _graph = graphWrapper.getGraph();

    for (Node node : _graph.getNodes()) {
      Node _node = node.like(node.getName() + ":0");
      _node.setNodeType(node.getNodeType());
      graph.addNode(_node);
    }

    for (Edge edge : _graph.getEdges()) {
      if (!Edges.isDirectedEdge(edge)) {
        throw new IllegalArgumentException();
      }

      Node from = edge.getNode1();
      Node to = edge.getNode2();

      Node _from = graph.getNode(from.getName(), 1);
      Node _to = graph.getNode(to.getName(), 0);

      graph.addDirectedEdge(_from, _to);
    }

    this.graph = graph;
  }
 /**
  * Generates a simple exemplar of this class to test serialization.
  *
  * @see edu.cmu.TestSerialization
  * @see TetradSerializableUtils
  */
 public static PValueImproverWrapper serializableInstance() {
   return new PValueImproverWrapper(
       GraphWrapper.serializableInstance(),
       DataWrapper.serializableInstance(),
       PcSearchParams.serializableInstance(),
       KnowledgeBoxModel.serializableInstance());
 }
 public PValueImproverWrapper(
     GraphWrapper graphWrapper, DataWrapper dataWrapper, PcSearchParams params) {
   super(dataWrapper, params);
   this.dataWrapper = dataWrapper;
   this.params2 = params;
   setGraph(new EdgeListGraph(graphWrapper.getGraph()));
 }
Example #4
0
 public VcpcAltRunner(
     DataWrapper dataWrapper,
     GraphWrapper graphWrapper,
     PcSearchParams params,
     KnowledgeBoxModel knowledgeBoxModel) {
   super(dataWrapper, params, knowledgeBoxModel);
   this.trueGraph = graphWrapper.getGraph();
 }
Example #5
0
 public TsFciRunner2(GraphWrapper graphWrapper, Parameters params) {
   super(graphWrapper.getGraph(), params);
 }
Example #6
0
 public TFciGesRunner(GraphWrapper graphWrapper, FciGesSearchParams params) {
   super(graphWrapper.getGraph(), params);
 }
Example #7
0
 /** Constucts a wrapper for the given EdgeListGraph. */
 public VcpcAltRunner(
     GraphWrapper graphWrapper, PcSearchParams params, KnowledgeBoxModel knowledgeBoxModel) {
   super(graphWrapper.getGraph(), params, knowledgeBoxModel);
 }
Example #8
0
 /** Constucts a wrapper for the given EdgeListGraph. */
 public VcpcAltRunner(GraphWrapper graphWrapper, PcSearchParams params) {
   super(graphWrapper.getGraph(), params);
 }
Example #9
0
 public VcpcAltRunner(DataWrapper dataWrapper, GraphWrapper graphWrapper, PcSearchParams params) {
   super(dataWrapper, params, null);
   this.trueGraph = graphWrapper.getGraph();
 }
Example #10
0
 public FciRunner(GraphWrapper graphWrapper, FciSearchParams params) {
   super(graphWrapper.getGraph(), params);
 }