age icon indicating copy to clipboard operation
age copied to clipboard

[Apache AGE Graph Generation Algorithms] Refactor on graph generation file

Open markgomer opened this issue 1 year ago • 1 comments

I hope these changes may facilitate future work on the project Apache AGE Graph Generation Algorithms

  • added the ability to build a bridge of a set number of vertexes   between the two complete graphs of the barbell graph;
  • changed create_complete_graph and age_create_barbell_graph to return the graphid as Datum from the first created vertex;
  • added helper struct graph_components with some attributes needed to create a graph;
  • added helper function to validate the arguments passed to age_create_barbell_graph;
  • added helper function to fill the graph_components struct with the arguments passed;
  • added helper function to fetch the label ids needed to build graphids;
  • added helper function to add the seq_id tables to the graph_components struct;
  • added helper function to create vertexes through the graph_components attributes;
  • added helper function to connect vertexes by graphid;
  • added helper function to insert a bridge of vertexes between two vertexes;
  • added more regress tests to age_create_barbell_graph;
  • fixed an issue where the system crashed when a vertex label is passed as NULL.

This PR is related to the issue #275. Closes #866.

markgomer avatar Mar 24 '23 23:03 markgomer

Here's a screenshot of age-viewer with some graphs created with this function:

2023-03-24 02-26-39

markgomer avatar Mar 30 '23 13:03 markgomer