-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
questionFurther information is requestedFurther information is requested
Description
I think it's worth considering having one Graph
type that can optionally include weights and metadata for an undirected graph, rather than having separate WeightedGraph
and MetaGraph
types. The Graph
constructor could have various optional type parameters, so you could create empty graphs like this:
# Create a graph with `Any` vertex type, Float64 edge weights,
# and no metadata.
Graph()
# Char graph with Float64 edge weights:
Graph{Char}()
# Char graph with Int weights:
Graph{Char, Int}()
# Char graph with Float64 edge weights and
# vertex data of type MyVertexData:
Graph{Char, Float64, MyVertexData}()
# Char graph with Float64 edge weights,
# vertex data of type MyVertexData,
# and edge data of type MyEdgeData:
Graph{Char, Float64, MyVertexData, MyEdgeData}()
# Char graph with Float64 edge weights,
# no vertex data, and edge data of type MyEdgeData:
Graph{Char, Float64, Nothing, MyEdgeData}()
Nothing
would be an option for the metadata type parameters, but not for the vertex type and weight type. (Default weight type would probably be Float64
.)
gdalle
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested