Class RandomGraph.UniformGraphGenerator
- Enclosing class:
- RandomGraph
"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:
- josephramsey
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUniformGraphGenerator
(int structure) Constructs a random graph generator for the given structure. -
Method Summary
Modifier and TypeMethodDescriptionvoid
generate()
getDag()
void
void
setMaxDegree
(int maxDegree) Sets the maximum degree of any nodes in the graph.void
setMaxEdges
(int maxEdges) void
setMaxInDegree
(int maxInDegree) void
setMaxOutDegree
(int maxOutDegree) void
setNumIterations
(int numIterations) void
setNumNodes
(int numNodes) Sets the number of nodes and resets all of the other parameters to default values accordingly.toString()
-
Field Details
-
ANY_DAG
public static final int ANY_DAG- See Also:
-
CONNECTED_DAG
public static final int CONNECTED_DAG- See Also:
-
-
Constructor Details
-
UniformGraphGenerator
public UniformGraphGenerator(int structure) Constructs a random graph generator for the given structure.- Parameters:
structure
- One of ANY_DAG, POLYTREE, or CONNECTED_DAG.
-
-
Method Details
-
setNumNodes
public 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 >= 4.
-
setMaxDegree
public void setMaxDegree(int maxDegree) Sets the maximum degree of any nodes in the graph.- Parameters:
maxDegree
- An integer between 3 and numNodes - 1, inclusively.
-
setMaxInDegree
public void setMaxInDegree(int maxInDegree) -
setMaxOutDegree
public void setMaxOutDegree(int maxOutDegree) -
setMaxEdges
public void setMaxEdges(int maxEdges) -
setNumIterations
public void setNumIterations(int numIterations) -
generate
public void generate() -
getDag
-
getDag
-
printEdges
public void printEdges() -
toString
-