Package edu.cmu.tetrad.graph
Class RandomGraph
java.lang.Object
edu.cmu.tetrad.graph.RandomGraph
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Generates random DAGs uniformly with certain classes of DAGs using variants of Markov chain algorithm by Malancon, Dutour, and Philippe. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addTwoCycles
(Graph graph, int numTwoCycles) static void
fixLatents1
(int numLatentConfounders, Graph graph) static void
fixLatents4
(int numLatentConfounders, Graph graph) static Graph
randomCyclicGraph2
(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 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.static Graph
randomDag
(int numNodes, int numLatentConfounders, int maxNumEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected) static Dag
randomDag
(List<Node> nodes, int numLatentConfounders, int maxNumEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected) static Graph
randomGraph
(int numNodes, int numLatentConfounders, int numEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected) static Graph
randomGraph
(List<Node> nodes, int numLatentConfounders, int maxNumEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected) Defaults to random forward graphs.static Graph
randomGraphRandomForwardEdges
(int numNodes, int numLatentConfounders, int numEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected) static Graph
randomGraphRandomForwardEdges
(List<Node> nodes, int numLatentConfounders, int numEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected) static Graph
randomGraphRandomForwardEdges
(List<Node> nodes, int numLatentConfounders, int numEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected, boolean layoutAsCircle) static Graph
randomGraphUniform
(List<Node> nodes, int numLatentConfounders, int maxNumEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected, int numIterations) static Graph
randomScaleFreeGraph
(int numNodes, int numLatentConfounders, double alpha, double beta, double delta_in, double delta_out)
-
Constructor Details
-
RandomGraph
public RandomGraph()
-
-
Method Details
-
randomDag
public static Graph randomDag(int numNodes, int numLatentConfounders, int maxNumEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected) -
randomDag
-
randomGraph
public static Graph randomGraph(int numNodes, int numLatentConfounders, int numEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected) -
randomGraph
public static Graph randomGraph(List<Node> nodes, int numLatentConfounders, int maxNumEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected) Defaults to random forward graphs. -
randomGraphUniform
-
randomGraphRandomForwardEdges
public static Graph randomGraphRandomForwardEdges(int numNodes, int numLatentConfounders, int numEdges, int maxDegree, int maxIndegree, int maxOutdegree, boolean connected) -
randomGraphRandomForwardEdges
-
randomGraphRandomForwardEdges
-
randomScaleFreeGraph
public static Graph randomScaleFreeGraph(int numNodes, int numLatentConfounders, double alpha, double beta, double delta_in, double delta_out) -
fixLatents1
-
fixLatents4
-
randomCyclicGraph2
Makes a cyclic graph by repeatedly adding cycles of length of 3, 4, or 5 to the graph, then finally adding two cycles. -
randomCyclicGraph3
public 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
-