Package edu.cmu.tetrad.graph
Class RandomGraph
java.lang.Object
edu.cmu.tetrad.graph.RandomGraph
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final classGenerates random DAGs uniformly with certain classes of DAGs using variants of Markov chain algorithm by Malancon, Dutour, and Philippe.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidaddTwoCycles(Graph graph, int numTwoCycles) static voidfixLatents1(int numLatentConfounders, Graph graph) static voidfixLatents4(int numLatentConfounders, Graph graph) static GraphrandomCyclicGraph2(int numNodes, int numEdges, int maxDegree) Makes a cyclic graph by repeatedly adding cycles of length of 3, 4, or 5 to the graph, then finally adding two cycles.static GraphrandomCyclicGraph3(int numNodes, int numEdges, int maxDegree, double probCycle, double probTwoCycle) Makes a cyclic graph by repeatedly adding cycles of length of 3, 4, or 5 to the graph, then finally adding two cycles.static GraphrandomDag(int numNodes, int numLatentConfounders, int maxNumEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected) static DagrandomDag(List<Node> nodes, int numLatentConfounders, int maxNumEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected) static GraphrandomGraph(int numNodes, int numLatentConfounders, int numEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected) static GraphrandomGraph(List<Node> nodes, int numLatentConfounders, int maxNumEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected) Defaults to random forward graphs.static GraphrandomGraphRandomForwardEdges(int numNodes, int numLatentConfounders, int numEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected) static GraphrandomGraphRandomForwardEdges(List<Node> nodes, int numLatentConfounders, int numEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected) static GraphrandomGraphRandomForwardEdges(List<Node> nodes, int numLatentConfounders, int numEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected, boolean layoutAsCircle) static GraphrandomGraphUniform(List<Node> nodes, int numLatentConfounders, int maxNumEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected, int numIterations) static GraphrandomScaleFreeGraph(int numNodes, int numLatentConfounders, double alpha, double beta, double delta_in, double delta_out) 
- 
Constructor Details- 
RandomGraphpublic RandomGraph()
 
- 
- 
Method Details- 
randomDagpublic static Graph randomDag(int numNodes, int numLatentConfounders, int maxNumEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected) 
- 
randomDag
- 
randomGraphpublic static Graph randomGraph(int numNodes, int numLatentConfounders, int numEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected) 
- 
randomGraphpublic static Graph randomGraph(List<Node> nodes, int numLatentConfounders, int maxNumEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected) Defaults to random forward graphs.
- 
randomGraphUniform
- 
randomGraphRandomForwardEdgespublic static Graph randomGraphRandomForwardEdges(int numNodes, int numLatentConfounders, int numEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected) 
- 
randomGraphRandomForwardEdges
- 
randomGraphRandomForwardEdges
- 
randomScaleFreeGraphpublic static Graph randomScaleFreeGraph(int numNodes, int numLatentConfounders, double alpha, double beta, double delta_in, double delta_out) 
- 
fixLatents1
- 
fixLatents4
- 
randomCyclicGraph2Makes a cyclic graph by repeatedly adding cycles of length of 3, 4, or 5 to the graph, then finally adding two cycles.
- 
randomCyclicGraph3public static Graph randomCyclicGraph3(int numNodes, int numEdges, int maxDegree, double probCycle, double probTwoCycle) Makes a cyclic graph by repeatedly adding cycles of length of 3, 4, or 5 to the graph, then finally adding two cycles.
- 
addTwoCycles
 
-