You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by GitBox <gi...@apache.org> on 2022/09/06 23:44:58 UTC

[GitHub] [age] JoshInnis opened a new issue, #276: Watts-Strogatz Graph

JoshInnis opened a new issue, #276:
URL: https://github.com/apache/age/issues/276

   The Watts–Strogatz model is a random graph generation model that produces graphs with small-world properties, including short average path lengths and high clustering.
   
   Syntax:
   ```
   ag_catalog.age_create_watts_strogatz_graph(graph_name Name, n int, k int, p float
                                       vertex_label_name Name DEFAULT = NULL,
                                       vertex_properties agtype DEFAULT = NULL,
                                       edge_label_name Name DEAULT = NULL,
                                       edge_properties agtype DEFAULT = NULL,
                                       bidirectional bool DEFAULT = true)
   ```
   
   Input: 
   - graph_name - Name of the graph to be created
   - n - The number of nodes
   - k - Each node is joined with its k nearest neighbors in a ring topology.
   - p -The probability of rewiring each edge
   - vertex_label_name - Name of the label to assign each vertex to.
   - vertex_properties - Property values to assign each vertex. Default is NULL
   - edge_label_name - Name of the label to assign each edge to.
   - edge_properties - Property values to assign each edge. Default is NULL
   - bidirectional - Bidirectional True or False. Default True.
   
   First create a ring over n nodes. Then each node in the ring is joined to its k nearest neighbors (or k-1 neighbors if k is odd). Then shortcuts are created by replacing some edges as follows: for each edge (u,v) in the underlying “n-ring with k nearest neighbors” with probability p replace it with a new edge (u,w) with uniformly random choice of existing node w.
   
   http://worrydream.com/refs/Watts-CollectiveDynamicsOfSmallWorldNetworks.pdf
   https://en.wikipedia.org/wiki/Watts%E2%80%93Strogatz_model
   https://github.com/JoshInnis/AGE-Machine-Learning/blob/main/graph-creation/create-directed-watts-strogatz-graph.sql


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@age.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org