Open maxitg opened 3 years ago
The box should be some kind of an interpretation box (ideally with a purple frame like Graph
if possible). Otherwise, if you copy it and use it as an input, it does not work.
And yes, the format should be Hyperedge[{vertices...}]
because, as you say, we need the second argument for other functionality.
Yes, that was really a quick implementation. As you said, the idea would be to TimeConstrain
it and show the Graph-like box if it takes too much time.
We can probably estimate how long it would take and constrain based on the number of vertices/hyperedges.
I'd like to suggest the following syntax for when it comes time to implement symmetries on hyperedges:
These all evaluate to Hyperedge[vertexlist, symmetrygroup]. The symmetry for colors is fully symmetric within each color. The symmetry for directed and undirected hyperedges is fully symmetric within the source, and the destination separately.
The problem
Have a
Hypergraph
symbol analogous toGraph
, which will convertHypergraph[{hyperedges... }]
to a (hopefully) optimized standard form. This will make easier the addition of new functions for working with hypergraphs as we could overload WL symbol (e.g.VertexList
,EdgeAdd
, etc.). Also, the head would allows as to make use ofMakeBoxes
to represent the hypergraph usingHypergraphPlot
.Possible solution
Proposed functionality:
Comment
Should the hyperedges be of the form
Hyperedge[{x, x, y, z}]
instead ofHyperedge[x, x, y, z]
? The idea was to specify directedness as a second argument, i.e.Hyperedge[..., "Directed" | "Undirected"]
.Additional context
The symbol should probably optimize when the hypergraph is solely composed of integer, i.e. by using
PackedArray
's.