Skip to content

Empty constructor to initialize Metagraphsnext #65

@harinandana02

Description

@harinandana02

At the moment MetaGraphs.jl/src/metagraphs.jl has an empty constructor which can be used to implement empty graphs. Also, the package Graphs.jl has empty constructors.

Similarly, can we have an empty constructor at MetaGraphsNext.jl/src/metagraphs.jl for constructing empty graphs of type MetagraphsNext?

Sample code:

  1. With MetaGraphs (working)
using MetaGraphs
     mg1 = MetaGraph() 
  1. With MetaGraphsNext (requesting review)
using MetaGraphsNext
         #adding an empty constructor
          MetaGraph() = MetaGraph{Int, SimpleGraph{Int}, Symbol, Nothing, Nothing, Nothing, e->1.0, Float64}()

With the help of this constructor we can initialize

using MetaGraphsNext
     mg2 = MetaGraph() 

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