Package edu.cmu.tetrad.graph
Class RandomGraph
java.lang.Object
edu.cmu.tetrad.graph.RandomGraph
-
Nested Class Summary
Nested 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 Summary
Constructors -
Method Summary
Modifier 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
-
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
-