ITensor / NamedGraphs.jl

Extension of `Graphs.jl` to graphs with named vertices.
MIT License
6 stars 3 forks source link

`named_*(vertices)` #66

Open mtfishman opened 6 months ago

mtfishman commented 6 months ago

Add support in functions like named_path_graph, named_grid, etc. for specifying custom vertex names with a function, dictionary, array, etc.

For example:

named_path_graph(["a", "b", "c"])
named_path_graph(v -> "v$v", 3)
named_grid(["a" "b"; "c" "d"])
named_grid(v -> "v$(v[1]),$(v[2])", (2, 2))