Closed nwlandry closed 1 year ago
Do we have one that goes the other way?
We have one that takes an SC as input, and outputs a HG containing the maximal simplices from the SC.
But Nich, can you no just do S = xgi.SimplicialComplex(H)
to do this?
When I try this, I get XGIError: Input data has unsupported type.
What about S = xgi.SimplicialComplex(H._edge)
I get XGIError: Cannot generate SimplicialComplex from simplex dictionary
😢
The only thing that works right now for me is SC = xgi.SimplicialComplex(H.edges.members())
The only thing that works right now for me is
SC = xgi.SimplicialComplex(H.edges.members())
Ah good. Is that what you wanted?
I get
XGIError: Cannot generate SimplicialComplex from simplex dictionary
😢
Ah yes true, we didn't implement that input format for SC. I don't remember if there was a reason or if we just didn't get round to it?
It's worth noting that H = xgi.Hypergraph(SC)
works so it would be great to implement something similar
@nwlandry if I'm not mistaken we have a solution to the original issue but mentioned another idea about implementing more input types for the SC constructor, right? If so, I'd close this issue and open a new one about that.
Good point. I'll do that.
The function would input a hypergraph, extract the maximal faces, and initialize a SimplicialComplex with these maximal faces.