Skip to content

Helper class for creating graph #7

@mscroggs

Description

@mscroggs

Is Your Feature Request Related to a Problem? Please Describe

Following #5, it would be helpful to add easier ways to create graphs

Describe the Solution You'd Like

A GraphBuilder class could:

  • Have an add_node method. This can have an optional input label, and it can used node{n} as default if unset
  • Have an add_edge method that adds an edge between two nodes
  • Have a create_graph method that finalises the graph ready for use. Or this could be called automatically the first time the graph is used.

Internally, the builder can do exactly what's currently in the graph tests.

Describe Alternatives You've Considered

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions