public Graph search(IFas fas, List<Node> nodes) { long beginTime = System.currentTimeMillis(); logger.log("info", "Starting FCI algorithm."); logger.log("info", "Independence test = " + getIndependenceTest() + "."); setMaxPathLength(maxPathLength); this.graph = new EdgeListGraph(nodes); long start1 = System.currentTimeMillis(); fas.setKnowledge(getKnowledge()); fas.setDepth(depth); fas.setVerbose(verbose); // fas.setFci(true); graph = fas.search(); graph.reorientAllWith(Endpoint.CIRCLE); this.sepsets = fas.getSepsets(); long stop1 = System.currentTimeMillis(); long start2 = System.currentTimeMillis(); // The original FCI, with or without JiJi Zhang's orientation rules fciOrientbk(getKnowledge(), graph, variables); ruleR0_RFCI(getRTuples()); // RFCI Algorithm 4.4 doFinalOrientation(); long endTime = System.currentTimeMillis(); this.elapsedTime = endTime - beginTime; logger.log("graph", "Returning graph: " + graph); long stop2 = System.currentTimeMillis(); logger.log("info", "Elapsed time adjacency search = " + (stop1 - start1) / 1000L + "s"); logger.log("info", "Elapsed time orientation search = " + (stop2 - start2) / 1000L + "s"); return graph; }