public class RandomGraphGenerator
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
RandomGraphGenerator.Connectedness |
Constructor and Description |
---|
RandomGraphGenerator()
Creates a new RandomGraphGenerator.
|
RandomGraphGenerator(de.uni_due.inf.ti.random.Distribution<java.lang.Integer> nodeCountDistribution,
de.uni_due.inf.ti.random.Distribution<java.lang.Double> densityDistribution,
de.uni_due.inf.ti.random.DiscreteDistribution<Label> labelDistribution)
Creates a new RandomGraphGenerator with user-specified distributions for
the number of nodes and the density.
|
RandomGraphGenerator(de.uni_due.inf.ti.random.Distribution<java.lang.Integer> nodeCountDistribution,
de.uni_due.inf.ti.random.Distribution<java.lang.Double> densityDistribution,
de.uni_due.inf.ti.random.DiscreteDistribution<Label> labelDistribution,
RandomGraphGenerator.Connectedness connectedness)
Creates a new RandomGraphGenerator with user-specified distributions for
the number of nodes and the density and a user-specified connectedness
setting.
|
RandomGraphGenerator(int numOfNodes,
double density,
java.util.Collection<Label> signature)
Creates a new RandomGraphGenerator which generates graph with a
user-specified number of nodes and density.
|
RandomGraphGenerator(int numOfNodes,
double density,
java.util.Collection<Label> signature,
RandomGraphGenerator.Connectedness connectedness)
Creates a new RandomGraphGenerator which generates graph with a
user-specified number of nodes and density.
|
RandomGraphGenerator(RandomGraphGenerator orig)
Returns a new RandomGraphGenerator with the same parameters as an
existing one.
|
Modifier and Type | Method and Description |
---|---|
Graph |
fillGraph(Graph graph)
Randomly completes a graph to a number of nodes and density.
|
RandomGraphGenerator.Connectedness |
getConnectedness()
Returns the connectedness setting of this RandomGraphGenerator.
|
de.uni_due.inf.ti.random.Distribution<java.lang.Double> |
getDensityDistribution()
Returns the distribution of the densities of the graphs generated
by this RandomGraphGenerator.
|
de.uni_due.inf.ti.random.DiscreteDistribution<Label> |
getLabelDistribution()
Returns the label distribution of this RandomGraphGenerator.
|
de.uni_due.inf.ti.random.Distribution<java.lang.Integer> |
getNodeCountDistribution()
Returns the distribution of the number of nodes of the graphs generated
by this RandomGraphGenerator.
|
java.util.Random |
getRandom()
Returns the random number generating used by this RandomGraphGenerator.
|
java.util.Set<Label> |
getSignature()
Returns the signature of this RandomGraphGenerator.
|
Graph |
nextGraph()
Returns a new, random graph.
|
void |
setConnectedness(RandomGraphGenerator.Connectedness c)
Sets the connectedness setting of this RandomGraphGenerator.
|
void |
setDensityDistribution(de.uni_due.inf.ti.random.Distribution<java.lang.Double> densityDistribution)
Sets the distribution of the densities of the graphs generated
by this RandomGraphGenerator.
|
void |
setLabelDistribution(de.uni_due.inf.ti.random.DiscreteDistribution<Label> labels)
Sets the label distribution of this RandomGraphGenerator.
|
void |
setNodeCountDistribution(de.uni_due.inf.ti.random.Distribution<java.lang.Integer> nodeCountDistribution)
Sets the distribution of the number of nodes of the graph generated
by this RandomGraphGenerator.
|
void |
setRandom(java.util.Random rng)
Sets the random number generator used by this RandomGraphGenerator.
|
void |
setSignature(java.util.Collection<Label> signature)
Sets the signature of this RandomGraphGenerator.
|
public RandomGraphGenerator()
public RandomGraphGenerator(RandomGraphGenerator orig)
public RandomGraphGenerator(de.uni_due.inf.ti.random.Distribution<java.lang.Integer> nodeCountDistribution, de.uni_due.inf.ti.random.Distribution<java.lang.Double> densityDistribution, de.uni_due.inf.ti.random.DiscreteDistribution<Label> labelDistribution, RandomGraphGenerator.Connectedness connectedness)
nodeCountDistribution
- distribution for the number of nodesdensityDistribution
- distribution for the densitylabelDistribution
- distribution of the labels occurring in the generated graphsconnected
- connectedness settingjava.lang.NullPointerException
- if one of the arguments is null
public RandomGraphGenerator(de.uni_due.inf.ti.random.Distribution<java.lang.Integer> nodeCountDistribution, de.uni_due.inf.ti.random.Distribution<java.lang.Double> densityDistribution, de.uni_due.inf.ti.random.DiscreteDistribution<Label> labelDistribution)
nodeCountDistribution
- distribution for the number of nodesdensityDistribution
- distribution for the densitylabelDistribution
- label distributionjava.lang.NullPointerException
- if one of the arguments is null
public RandomGraphGenerator(int numOfNodes, double density, java.util.Collection<Label> signature, RandomGraphGenerator.Connectedness connectedness)
numOfNodes
- number of nodes of the graphs generated by the new
RandomGraphGeneratordensity
- (approximate) density of the generated graphssignature
- the set of labels that can occur in the generated graphsconnectedness
- connectedness setting of the new RandomGraphGeneratorjava.lang.NullPointerException
- if one of the arguments is null
public RandomGraphGenerator(int numOfNodes, double density, java.util.Collection<Label> signature)
numOfNodes
- number of nodes of the graphs generated by the new
RandomGraphGeneratordensity
- density of the graph generated by the new RandomGraphGeneratorjava.lang.NullPointerException
- if signature
is null
public de.uni_due.inf.ti.random.Distribution<java.lang.Integer> getNodeCountDistribution()
public void setNodeCountDistribution(de.uni_due.inf.ti.random.Distribution<java.lang.Integer> nodeCountDistribution)
nodeCountDistribution
- the new node count distribution of this RandomGraphGeneratorjava.lang.NullPointerException
- if nodeCountDistribution
is null
public de.uni_due.inf.ti.random.Distribution<java.lang.Double> getDensityDistribution()
public void setDensityDistribution(de.uni_due.inf.ti.random.Distribution<java.lang.Double> densityDistribution)
densityDistribution
- the new density distribution of this RandomGraphGeneratorjava.lang.NullPointerException
- if densityDistribution
is null
public RandomGraphGenerator.Connectedness getConnectedness()
public void setConnectedness(RandomGraphGenerator.Connectedness c)
public void setSignature(java.util.Collection<Label> signature)
setLabelDistribution(de.uni_due.inf.ti.random.DiscreteDistribution<de.uni_due.inf.ti.graph.Label>)
method should be used.signature
- sets the signature of this RandomGraphGeneratorjava.lang.NullPointerException
- if signature
is null
public java.util.Set<Label> getSignature()
public void setLabelDistribution(de.uni_due.inf.ti.random.DiscreteDistribution<Label> labels)
labels
- the new label distribution of this RandomGraphGeneratorjava.lang.NullPointerException
- if labels
is null
public de.uni_due.inf.ti.random.DiscreteDistribution<Label> getLabelDistribution()
public java.util.Random getRandom()
public void setRandom(java.util.Random rng)
public Graph nextGraph()
public Graph fillGraph(Graph graph)
graph
- graph which is extended, or null
if a new graph should
be createdgraph
is non-null, then
graph
is returned, otherwise a newly created graph