(Directed acyclic) graphs with non-integer data type

Is there a Julia package that I can use for defining a directed acyclic graph with non-integer vertices? I looked around at Graphs.jl, but it seems that I’m restricted to integer indices there. The main indices I do want would be NTuple{3, Int64}.

SimpleGraphs.jl allows non-integer vertices:

1 Like

Great! That indeed seems to work:

dag = DirectedGraph{NTuple{3, Int64}}()
[add!(dag, v) for v in [(1, 2, 3), (3, 2, 1)]]
add!(dag, (1, 2, 3), (3, 2, 1))

Thank you.

1 Like

There is also an ongoing discussion about the best way to incorporate vertex- and edge-level metadata (like tuples) into the Graphs.jl ecosystem. Some packages already exist, like MetaGraphsNext.jl, but they’re still kind of experimental, and more thought is needed on their design

1 Like