You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Lattice wraps a SimpleGraph{Int} together with a BijectiveDict between AbstractLane and Int for implementing a graph with AbstractLanes as indexing vertices.
The problem is that if we remove a vertex from the SimpleGraph, the already existing vertices with vertex code bigger than the removed vertex, are renamed.
In general, we need a graph with vertex indexing metadata (that's what Lattice is really) but MetaGraphsNext feels like too much boilerplate and @mtfishman's NamedGraphs.jl and DataGraphs.jl add too many dependencies and rely on Dictionaries.jl... which I can't really use.
For preserving lattice topology when performing different operations, we will also require to be able to group vertices temporarily... just like @mtfishman's PartitionedGraphs.jl (we seem to be facing similar design issues).
The text was updated successfully, but these errors were encountered:
@mofeing indeed I imagine these kinds of graph data structures are fundamental to designing general tensor networks.
Why do you say you can't use Dictionaries.jl? Maybe we could cut down on some of the dependencies of NamedGraphs.jl/DataGraphs.jl but they are all pretty lightweight. Note that NamedGraphs.j and DataGraphs.jl are based around AbstractNamedGraph/AbstractDataGraph supertypes so you could probably design your own named graph/data graph subtypes that use different dictionary types if you wanted to. (Also credit should go to @JoeyT1994 as well for helping with the development of these packages!).
i think it's a matter of taste but i find it quite hard to work with. it doesn't work well with Julia's native Dict (i know it can convert but the return type of many Dict functions are different), and one of my main obstacles is that many times i just want to get another type out of it (e.g. get me a Vector with the keys filtered using this) but it always forces to return a Dictionary. i wasted time in the past to try work with it, so i have as a norm to try to avoid it.
Maybe we could cut down on some of the dependencies of NamedGraphs.jl/DataGraphs.jl but they are all pretty lightweight. Note that NamedGraphs.j and DataGraphs.jl are based around AbstractNamedGraph/AbstractDataGraph supertypes so you could probably design your own named graph/data graph subtypes that use different dictionary types if you wanted to. (Also credit should go to @JoeyT1994 as well for helping with the development of these packages!).
that's nice! i would also need PartitionedGraphs.jl with i think it also uses them right?
it would also help with integration between ITensorNetworks.jl and Tenet.jl, because it would allow us to preserve the lattice information.
i can try an implementation without using them directly first, and let the custom implementation of NamedGraph and the rest for latter.
Currently,
Lattice
wraps aSimpleGraph{Int}
together with aBijectiveDict
betweenAbstractLane
andInt
for implementing a graph withAbstractLane
s as indexing vertices.The problem is that if we remove a vertex from the
SimpleGraph
, the already existing vertices with vertex code bigger than the removed vertex, are renamed.In general, we need a graph with vertex indexing metadata (that's what
Lattice
is really) but MetaGraphsNext feels like too much boilerplate and @mtfishman's NamedGraphs.jl and DataGraphs.jl add too many dependencies and rely on Dictionaries.jl... which I can't really use.For preserving lattice topology when performing different operations, we will also require to be able to group vertices temporarily... just like @mtfishman's PartitionedGraphs.jl (we seem to be facing similar design issues).
The text was updated successfully, but these errors were encountered: