Jens Müller wrote:
Jens Müller wrote:
struct VertexProperties { float x; float y; };
struct EdgeProperties { float length; };
My fault - changed this to double, and it worked.
Well, nearly - now it crashes when it reaches the edges:
$ ./separator -f test -i planar100k.graphml terminate called after throwing an instance of 'boost::property_not_found' what(): Property not found: length. Aborted
Why isn't dp.property("length", get(&EdgeProperties::length, g)); sufficient?
Program received signal SIGABRT, Aborted. [Switching to Thread -1211529024 (LWP 5247)] 0xffffe410 in __kernel_vsyscall () (gdb) bt #0 0xffffe410 in __kernel_vsyscall () #1 0xb7cdf7d0 in raise () from /lib/libc.so.6 #2 0xb7ce0ea3 in abort () from /lib/libc.so.6 #3 0xb7ee13a0 in __gnu_cxx::__verbose_terminate_handler () from /usr/lib/libstdc++.so.6 #4 0xb7ededc5 in std::set_unexpected () from /usr/lib/libstdc++.so.6 #5 0xb7edee02 in std::terminate () from /usr/lib/libstdc++.so.6 #6 0xb7edef3a in __cxa_throw () from /usr/lib/libstdc++.so.6 #7 0x0805b3c8 in boost::put<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS>, double> (name=@0x807640c, dp=@0xbfbfc9e4, key=@0xbfbfca08, value=@0xbfbfb130) at /usr/include/boost/dynamic_property_map.hpp:284 #8 0x0805b8fe in boost::mutate_graph_impl<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS> >::set_graph_property (this=0xbfbfc6ec, name=@0x807640c, value=@0xbfbfb298, value_type=@0x807642c) at graphml.hpp:203 #9 0x08063805 in graphml_reader::handle_property (this=0xbfbfc604, key_id=@0xbfbfb2a0, descriptor=@0xbfbfb29c, is_vertex=false, value=@0xbfbfb298) at graphml.cpp:363 #10 0x0806518d in graphml_reader::handle_edge (this=0xbfbfc604, e=@0xbfbfb320, u=@0xbfbfb31c, v=@0xbfbfb318) at graphml.cpp:355 #11 0x080660c9 in graphml_reader::on_start_element (user_data=0xbfbfc604, c_name=0x80761a0 "edge", atts=0x8073fe0) at graphml.cpp:181 #12 0xb7f1435c in XML_ParserCreate () from /usr/lib/libexpat.so.1 #13 0xb7f14e2d in XML_ParserCreate () from /usr/lib/libexpat.so.1 #14 0xb7f0e62b in XML_ParseBuffer () from /usr/lib/libexpat.so.1 #15 0xb7f17292 in XML_Parse () from /usr/lib/libexpat.so.1 #16 0x0806680d in graphml_reader::run (this=0xbfbfc604, in=@0xbfbfc818) at graphml.cpp:68 #17 0x080603cc in boost::read_graphml (in=@0xbfbfc818, g=@0xbfbfc6ec) at graphml.cpp:408 #18 0x08051c5b in boost::read_graphml<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, VertexProperties, EdgeProperties, boost::no_property, boost::listS> > (in=@0xbfbfc818, g=@0xbfbfca08, dp=@0xbfbfc9e4) at graphml.hpp:235 #19 0x0804fae9 in main (argc=5 '\005', argv=0xbfbfcd54) at separator.cpp:328 Is it trying to set a graph property instead of an edge property?! -> boost::mutate_graph_impl<...>::set_graph_property (#8)