maxitg / SetReplace

C++/Wolfram Language package for exploring set and graph rewriting systems
MIT License
219 stars 45 forks source link

Optimization: avoid 2-edge cycles for computing embedding #239

Closed maxitg closed 4 years ago

maxitg commented 4 years ago

For computing vertex embedding in WolframModelPlot, it is not necessary to convert 2-edges into cycles (i.e., {1, 2} to {{1, 2}, {2, 1}}) when converting a hypergraph to a normal graph. A single edge is sufficient in this case. This might potentially make computing such embedding much faster as the 2-graphs will be half the size.

Also, it would make the embedding of 2-graphs consistent with the one used in GraphPlot.

Warning: this will change the embedding for any graph containing 2-edges.

maxitg commented 4 years ago

As far as I remember, I tried it before, and it didn't really help.