Package edu.cmu.tetrad.graph
Class GraphGeneratorRandomNumEdges
java.lang.Object
edu.cmu.tetrad.graph.GraphGeneratorRandomNumEdges
Modifies the UniformGraphGenerator to generate random DAGs (not assuming
 connectivity) with number of edges in given range, min to max. Constraints on
 connectivity are removed. Original docs follow.
 Generates random DAGs uniformly with certain classes of DAGs using variants
 of Markov chain algorithm by Malancon, Dutour, and Philippe. Pieces of the
 infrastructure of the algorithm are adapted from the the BNGenerator class by
 Jaime Shinsuke Ide jaime.ide@poli.usp.br, released under the GNU General
 Public License, for which the following statement is being included as part
 of the license agreement:
 "The BNGenerator distribution is free software; you can redistribute it
 and/or modify it under the terms of the GNU General Public License as
 published by the Free Software Foundation (either version 2 of the License
 or, at your option, any later version), provided that this notice and the
 name of the author appear in all copies. "If you're using the software,
 please notify jaime.ide@poli.usp.br so that you can receive updates and
 patches. BNGenerator is distributed "as is", in the hope that it will be
 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 Public License for more details. You should have received a copy of the GNU
 General Public License along with the BNGenerator distribution. If not, write
 to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
 USA."
- Author:
- Joseph Ramsey
- 
Constructor SummaryConstructorsConstructorDescriptionGraphGeneratorRandomNumEdges(int structure) Constructs a random graph generator for the given structure.
- 
Method SummaryModifier and TypeMethodDescriptionvoidgenerate()getDag()voidsetMaxEdges(int maxEdges) voidsetMinEdges(int minEdges) voidsetNumNodes(int numNodes) Sets the number of nodes and resets all of the other parameters to default values accordingly.toString()
- 
Constructor Details- 
GraphGeneratorRandomNumEdgespublic GraphGeneratorRandomNumEdges(int structure) Constructs a random graph generator for the given structure.- Parameters:
- structure- One of ANY_DAG, POLYTREE, or CONNECTED_DAG.
 
 
- 
- 
Method Details- 
setNumNodespublic void setNumNodes(int numNodes) Sets the number of nodes and resets all of the other parameters to default values accordingly.- Parameters:
- numNodes- Must be an integer greater than or equal to 4.
 
- 
setMinEdgespublic void setMinEdges(int minEdges) 
- 
setMaxEdgespublic void setMaxEdges(int maxEdges) 
- 
generatepublic void generate()
- 
getDag
- 
toString
 
-