Generating Graphs

Generate undirected (random direction) graphs with semi-real random distributions based on theoretical models. Providing a node label will generate nodes with that label and a random uuid property. Providing a relationship type will generate relationships with that type. Providing null in place of labels and/or relationships will generate random Person nodes with a random name and FRIEND_OF relationships, respectively.

For a theoretical introduction, please take a look at the following blog posts:

For permitted configuration values, please look at the Javadoc of config classes of the respective generators (BarabasiAlbertConfig, ErdosRenyiConfig, WattsStrogatzConfig, and DistributionBasedConfig).

Apart from the number of nodes you would like to generate, null can be passed in for all other parameters. Sensible defaults will be used.


CALL, 2, 'TestLabel', 'TEST_REL_TYPE')
CALL, null, null, null)
CALL apoc.generate.simple([2,2,2,2], null, null)