public class GraphGenerator extends Object
Random with a hard-coded seed. However, it also
uses DistributionGenerator, which in turn uses a Random
seeded with System.currentTimeMillis(). Because of this
time-sensitive seed in DistributionGenerator, the output of this
class is not sanely reproducible even when its inputs are fixed.| Modifier and Type | Field and Description |
|---|---|
static double |
GAMMA |
static long |
INITIAL_VERTEX_UID |
| Constructor and Description |
|---|
GraphGenerator(Schema schema) |
| Modifier and Type | Method and Description |
|---|---|
void |
generateData(TitanGraph g)
Generate a scale-free graph using parameters specified in the
Schema object provided to this instance's constructor. |
void |
generateTypesAndData(TitanGraph g) |
void |
generateTypesAndLoadData(TitanGraph g,
InputStream data) |
static void |
main(String[] args) |
static void |
writeData(TitanGraph g,
OutputStream data) |
public static final long INITIAL_VERTEX_UID
public static final double GAMMA
public GraphGenerator(Schema schema)
public void generateTypesAndData(TitanGraph g)
public void generateData(TitanGraph g)
Schema object provided to this instance's constructor. The types
must already exist. The types can be created by either calling
generateTypesAndData(TitanGraph) instead of this method or by
calling Schema.makeTypes(TitanGraph) before calling this method.g - A graph with types predefined. If it already contains vertices
or relations, they may be overwritten.public static void writeData(TitanGraph g, OutputStream data) throws IOException
IOExceptionpublic void generateTypesAndLoadData(TitanGraph g, InputStream data) throws IOException
IOExceptionpublic static void main(String[] args) throws IOException
IOExceptionCopyright © 2012–2016. All rights reserved.