public class DistributionGenerator extends AbstractGenerator
setOutDistribution(com.tinkerpop.furnace.alpha.generators.Distribution)| Constructor and Description |
|---|
DistributionGenerator(String label) |
DistributionGenerator(String label,
EdgeAnnotator annotator) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearInDistribution()
Clears the in-degree distribution
|
int |
generate(com.tinkerpop.blueprints.Graph graph,
int expectedNumEdges)
Generates a synthetic network connecting all vertices in the provided graph with the expected number
of edges.
|
int |
generate(com.tinkerpop.blueprints.Graph graph,
Iterable<com.tinkerpop.blueprints.Vertex> vertices,
int expectedNumEdges)
Generates a synthetic network connecting the given vertices by the expected number of directed edges
in the provided graph.
|
int |
generate(com.tinkerpop.blueprints.Graph graph,
Iterable<com.tinkerpop.blueprints.Vertex> out,
Iterable<com.tinkerpop.blueprints.Vertex> in,
int expectedNumEdges)
Generates a synthetic network connecting the vertices in out by directed edges
with those in in with the given number of expected edges in the provided graph.
|
boolean |
hasAllowLoops()
Whether edge loops are allowed
|
void |
setAllowLoops(boolean allowLoops)
Sets whether loops, i.e.
|
void |
setInDistribution(Distribution distribution)
Sets the in-degree distribution to be used by this generator.
|
void |
setOutDistribution(Distribution distribution)
Sets the out-degree distribution to be used by this generator.
|
addEdge, getEdgeAnnotator, getLabel, getVertexAnnotator, processVertexpublic DistributionGenerator(String label, EdgeAnnotator annotator)
label - annotator - AbstractGenerator.AbstractGenerator(String, EdgeAnnotator)public DistributionGenerator(String label)
label - AbstractGenerator.AbstractGenerator(String)public void setOutDistribution(Distribution distribution)
distribution - public void setInDistribution(Distribution distribution)
CopyDistribution is used by default.distribution - public void clearInDistribution()
public boolean hasAllowLoops()
public void setAllowLoops(boolean allowLoops)
allowLoops - public int generate(com.tinkerpop.blueprints.Graph graph,
int expectedNumEdges)
graph - expectedNumEdges - public int generate(com.tinkerpop.blueprints.Graph graph,
Iterable<com.tinkerpop.blueprints.Vertex> vertices,
int expectedNumEdges)
graph - vertices - expectedNumEdges - public int generate(com.tinkerpop.blueprints.Graph graph,
Iterable<com.tinkerpop.blueprints.Vertex> out,
Iterable<com.tinkerpop.blueprints.Vertex> in,
int expectedNumEdges)
graph - out - in - expectedNumEdges - Copyright © 2012–2016. All rights reserved.