On 17.08.2015 16:41, ob wrote:
It is important to note however that in graph-tool regular float/double properties (not vectors) are also stored in hex format. I'm not sure if this is a violation of the standard, since I don't know if they specify exactly how a float is represented, but this may cause problems with interoperability as well (possibly networkx would also choke). I made this choice because for my own uses, it is very important that no information is lost during encoding.
I'm not sure if this discussion led anywhere. It seems that there is still a compatibility issue with basic data types float and double to networkx. The reason is that graph-tool uses hex-format as lexical representation. However, XML standard defines decimal format for float (http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#float) and double. Maybe we can have a parameter in the save function to enable this standard.
Implementing a parameter in the save function is easy, and I believe is the correct approach, since regardless of the ambiguity of the standard, most implementations expect a decimal format. Of course, it is hard to guarantee exactness with a decimal representation, hence I still think it is justifiable to keep the hex format as default. I'll implement this soon. (If there is any urgency with this, please open an issue in the website.) Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>