Esempio n. 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;
  }
Esempio n. 2
0
 /**
  * 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());
 }
Esempio n. 3
0
 public PValueImproverWrapper(
     GraphWrapper graphWrapper, DataWrapper dataWrapper, PcSearchParams params) {
   super(dataWrapper, params);
   this.dataWrapper = dataWrapper;
   this.params2 = params;
   setGraph(new EdgeListGraph(graphWrapper.getGraph()));
 }
Esempio n. 4
0
 public VcpcAltRunner(
     DataWrapper dataWrapper,
     GraphWrapper graphWrapper,
     PcSearchParams params,
     KnowledgeBoxModel knowledgeBoxModel) {
   super(dataWrapper, params, knowledgeBoxModel);
   this.trueGraph = graphWrapper.getGraph();
 }
Esempio n. 5
0
 public TsFciRunner2(GraphWrapper graphWrapper, Parameters params) {
   super(graphWrapper.getGraph(), params);
 }
Esempio n. 6
0
 public TFciGesRunner(GraphWrapper graphWrapper, FciGesSearchParams params) {
   super(graphWrapper.getGraph(), params);
 }
Esempio n. 7
0
 /** Constucts a wrapper for the given EdgeListGraph. */
 public VcpcAltRunner(
     GraphWrapper graphWrapper, PcSearchParams params, KnowledgeBoxModel knowledgeBoxModel) {
   super(graphWrapper.getGraph(), params, knowledgeBoxModel);
 }
Esempio n. 8
0
 /** Constucts a wrapper for the given EdgeListGraph. */
 public VcpcAltRunner(GraphWrapper graphWrapper, PcSearchParams params) {
   super(graphWrapper.getGraph(), params);
 }
Esempio n. 9
0
 public VcpcAltRunner(DataWrapper dataWrapper, GraphWrapper graphWrapper, PcSearchParams params) {
   super(dataWrapper, params, null);
   this.trueGraph = graphWrapper.getGraph();
 }
Esempio n. 10
0
 public FciRunner(GraphWrapper graphWrapper, FciSearchParams params) {
   super(graphWrapper.getGraph(), params);
 }