2

I'm trying to write an algorithm which creates the dual of a graph. To check whether the graph is planar or not I use the Boyer-Myrvold planarity test (Boost implementation) through the vtkBoostGraphAdapter. That works fine (only on vtkUndirectedGraph-s but that's OK for now). (boost.org/doc/libs/1_56_0/libs/graph/doc/boyer_myrvold.html)

To create the dual I need to traverse the faces of the planar graph for which I also have a Boost tool called the planar_face_traversal_visitor. (boost.org/doc/libs/1_56_0/libs/graph/doc/planar_face_traversal.html) There's a guy, Aaron Windsor who implemented the appropriate visitor class that is able to create the dual of a graph in Boost. (https://github.com/aaw/boost_planar_graph_dual) That also works fine using only Boost but I'd like to adapt this feature as well using vtkBoostGraphAdapter.

Here's my code: http://pastebin.com/g0Mtw6Ph

These are my errors:

  • /usr/local/boost_1_56_0/boost/property_map/property_map.hpp:302:19: No viable overloaded operator[] for type 'const boost::iterator_property_map, std::__1::allocator > > *>, boost::vtkGraphIndexMap, std::__1::map, std::__1::allocator > >, std::__1::map, std::__1::allocator > > &>'
  • /usr/local/boost_1_56_0/boost/property_map/property_map.hpp:309:5: No viable overloaded operator[] for type 'const boost::iterator_property_map, std::__1::allocator > > *>, boost::vtkGraphIndexMap, std::__1::map, std::__1::allocator > >, std::__1::map, std::__1::allocator > > &>'
  • /usr/local/boost_1_56_0/boost/property_map/property_map.hpp:302:19: No viable overloaded operator[] for type 'const boost::iterator_property_map, std::__1::allocator > *>, boost::vtkGraphIndexMap, std::__1::set, std::__1::allocator >, std::__1::set, std::__1::allocator > &>'
  • /usr/local/boost_1_56_0/boost/property_map/property_map.hpp:309:5: No viable overloaded operator[] for type 'const boost::iterator_property_map, std::__1::allocator > *>, boost::vtkGraphIndexMap, std::__1::set, std::__1::allocator >, std::__1::set, std::__1::allocator > &>'
  • /usr/local/boost_1_56_0/boost/planar_dual.hpp:38:38: No viable overloaded operator[] for type 'edge_to_face_map_t' (aka 'iterator_property_map')

I've been dealing with this, reading the source code really deep and trying a couple of things in the past few days but I can't really figure out what the problem is. Is the vtkBoostGraphAdapter properly prepared for this kind of usage?

Any kind of help appreciated!

Thanks in advance!

Szilard

  • Please link to your relevant discussion http://comments.gmane.org/gmane.comp.lib.vtk.user/74535 on the vtkusers list – sehe Oct 13 '14 at 07:59
  • VTK Users: http://vtk.1045678.n5.nabble.com/Creating-the-dual-of-a-graph-planar-face-traversal-vtkBoostGraphAdapter-tt5729055.html VTK Dev: http://vtk.1045678.n5.nabble.com/Re-vtkusers-Creating-the-dual-of-a-graph-planar-face-traversal-vtkBoostGraphAdapter-tt5729058.html – Szilárd Szalóki Oct 13 '14 at 09:08

0 Answers0