You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@age.apache.org by "MatheusFarias03 (via GitHub)" <gi...@apache.org> on 2023/05/12 22:11:14 UTC
[GitHub] [age] MatheusFarias03 opened a new pull request, #917: Barabasi-Albert Graph
MatheusFarias03 opened a new pull request, #917:
URL: https://github.com/apache/age/pull/917
Hi there! I've added a new function to generate Barabasi-Albert graphs, which I believe could be a valuable addition to this project and also is labeled as an enhancement tag at #278 . I've also included a screenshot of the graph visualization to demonstrate what the generated graph looks like with 50 nodes and with bidirectional edges.

The function is implemented in `src/backend/utils/graph_generation.c` and it is defined as:
```sql
ag_catalog.age_create_barabasi_albert_graph(graph_name name,
num_vertices int,
num_edges int,
node_label name = NULL,
edge_label name = NULL,
bidirectional bool = true)
```
And the input is as follows:
```markdown
Input:
1. graph_name - Name of the graph to be created
2. n - The number of vertices
3. m - Number of edges to attach from a new node to existing nodes
4. vertex_label_name - Name of the label to assign each vertex to.
5. edge_label_name - Name of the label to assign each edge to.
6. bidirectional - Bidirectional True or False. Default True.
```
Additionally, I've added some auxiliary functions to handle the graph, since I could not call the functions that use `GRAPH_global_context`, `vertex_entity` and `edge_entity` in the file that I was working on and I didn't want to change them because it would probably have some effects on other files.
Please let me know if you have any feedback or suggestions for improvements. Thank you for considering my contribution!
--
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: commits-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [age] MatheusFarias03 closed pull request #917: [Graph Generation Algorithms] Barabasi-Albert Graph
Posted by "MatheusFarias03 (via GitHub)" <gi...@apache.org>.
MatheusFarias03 closed pull request #917: [Graph Generation Algorithms] Barabasi-Albert Graph
URL: https://github.com/apache/age/pull/917
--
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: commits-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org