On 02/23/2007 02:02 PM, Jens Müller wrote:
I tried your first example graph at https://projects.forked.de/graph-tool/wiki/GraphToolGuide#Fileformatdescript...
That gives me:
terminate called after throwing an instance of 'boost::property_not_found' what(): Property not found: weight.
My dynamic properties are:
dynamic_properties dp; dp.property("coord1", get(&VertexProperties::x, g)); dp.property("coord2", get(&VertexProperties::y, g)); dp.property("length", get(&EdgeProperties::length, g));
So I think this error message is a bit strange ...
Reading the 2nd example with edgedefault="undirected" changed to "directed" seems to work, even with the dp as above.
Reading the 1st example btw does not even work with an empty dp object.
Somehow you seem to have a hard-coded weight property?
The reader will always try to put a property it finds in the file in the dynamic_properties you pass to it. If the property doesn't exist already, it is up to the dynamic_property object to create it or not. By default it throws an exception, instead of creating. You need to supply it with a function in the constructor that will create it automatically. Take a look at: http://www.boost.org/libs/property_map/doc/dynamic_property_map.html#member-... -- Tiago de Paula Peixoto <tiago@forked.de>