Skip to content

add_vertex! API #41

Description

@filchristou

Some discussions (JuliaGraphs/Graphs.jl#122, JuliaGraphs/Graphs.jl#146, JuliaGraphs/Graphs.jl#165) argue that add_vertex! should return the index of the newly added vertex. Currently, the compromise is that add_vertex! returns Bool.

Would you consider entering a transient phase and support both ?

For example, this would mean appropriately modifying the following line:


A valid alternative would be to check nv(meta_graph.graph) before and after the add_vertex! operation.

Motivation

As mentioned in #40 and QuantumBFS/Multigraphs.jl#17 I would like to generalize the use cases for MetaGraphsNext and more specifically have it work with Multigraphs.
Multigraphs.jl's add_vertex! already return an index.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions