No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build
java
.gitignore
LICENSE
README.md

README.md

GTNA.GraphGenerators

This generator allow for the generation of graph snapshots using various models. The generator are all implemented in GTNA.

Usage

To generate a list of graphs using a specific generator, use the following call:

java -jar graphGenerator.jar $generatorType $generatorArgs $outputDir $graphFrom $graphTo $writerType $writerArgs $suffix

First, the model tu generate the graphs must be specified by a kexword. The number of arguments / parameters for its generation depend on the model. These arguments are next specified as a list, separated by ,. As third argument, the directory where the generated graph should be written must be specified. Then, the first an last graph index to generate must be specified (use the same for both to only generate a single graph). The fifth argument specified which format should be used to write the generated graph. The sixth arguments is used to specify a list of arguments for the writer, currently only EdgeList takes a single argument; for the others - should simply be used to denote that there are no arguments specified. Finally, the suffix of the graph to be written should be specified.

expecting 8 arguments (got 0)
   0: generatorType - type of the graph generator to use (String)
      values:  COMPLETE REGULAR RING STAR KLEINBERG KLEINBERG_1D KLEINBERG_1DC KLEINBERG_POWER_LAW WOT CONDON_KARP CONDON_KARP_GENERALIZED DE_BRUIJN GIRVAN_NEWMAN GLP GN GNC GNR PARG POSITIVE_FEEDBACK_PREFERENCE ERDOS_RENYI BARABASI_ALBERT WATTS_STROGATZ ZHOU_MONDRAGON

   1: generatorArgs - arguments for the generator (String[]) sep. by ','

   2: outputDir - dir where to write the graphs (ending with '/') (String)

   3: graphFrom - first graph index (Integer)

   4: graphTo - last graph index (Integer)

   5: writerType - type of the graph writer used for outputting the graphs (String)
      values:  EDGE_LIST GTNA CSV GEXF

   6: writerArgs - arguments for the graph writer (only required by EDGE_LIST: separator, use '-' otherwise) (String[]) sep. by ','

   7: suffix - suffix of the graph to write, e.g., '.EdgeList' (String)

The resulting files are all written to ${outputDir}${id}${suffix} where ${id} is between ${graphFrom} and ${graphTo}.

Models and their arguments

GraphWriters (and their arguments)

Examples

The following generates 10 random graphs using the ErdosRenyi model. Here, the parameters specify that the graph should be directed and contain 100 vertices with an average degree of 5.3. These graphs are written to randomGraphs/0.el, randomGraphs/1.el, ..., randomGeaphs/9.el in the EdgeList format.

java -jar graphGenerators.jar ERDOS_RENYI 100,5.3,false randomGraphs/ 0 9 EDGE_LIST - .el

The following examples generates a singe graph using the BarabasiAlbert model:

java -jar graphGenerators.jar BARABASI_ALBERT 200,3 powerLawGraphs/ 0 0 GTNA - .gtna

Download

A built jar file for standalone usage can be downloaded from dynamic-networks.org.

Building from source

To build the jar file from source (e.g., using the ant build file build/build.xml), you need a complete version of the GTNA sources as well as ArgList.