Closed jamesdbaker closed 5 months ago
Yeah we should handle this case. In the meantime, can you try swapping long for int? I don’t think it will overflow with the current implementation
Indeed we will probably map them to isize https://github.com/Qiskit/rustworkx/blob/af0d36caa3d3b3488bdb0297b2014e5f3154f994/src/graphml.rs#L129 likes we already do with int
The GraphML spec (http://graphml.graphdrawing.org/xmlns/1.0rc/graphml-attributes.xsd) states that the allowed attribute types are:
However, loading a GraphML file with an attribute type of long (e.g.
<key id="d0" for="edge" attr.name="weight" attr.type="long"/>
fails with:The issue seems to be that the Type enum doesn't have a Long type. Could this be added?
https://github.com/Qiskit/rustworkx/blob/af0d36caa3d3b3488bdb0297b2014e5f3154f994/src/graphml.rs#L118-L124