Skip to content

IsMutable trait #92

Open
Open
@etiennedeg

Description

@etiennedeg

#88, #89, #85 raise the need to have a specific interface for mutable graph.
This is useful to explicit the output type of the graph for function returning another graph. As a mutable graph could model any graph structure, the output of these functions would just be a graph of the same type as the input graph. Would fall under the IsMutable trait the graphs implementing [add|remove]_vertex!, [add|remove]_edge! and some non mandatory ones like zero, [add|remove]_vertices!, [add|remove]_edges! (zero could eventually be mandatory).

Maybe that for non mutable graph, we could add a method which would precise the expected return type of the graph under mutation.

There are still some corner cases like functions taking as input an undirected graph and returning a directed one, for which this trait will not help to get it generic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions