[vtkusers] Creating the dual of a graph - planar face traversal - vtkBoostGraphAdapter

Szilárd Szalóki szilardszaloki at gmail.com
Wed Oct 8 14:12:08 EDT 2014


Hi All,

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).
(http://www.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.
(
http://www.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:

   - *vtkDualGraph.cpp*:44:9: No matching function for call to 'put'
   - /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::__wrap_iter<std::__1::map<long long,
   vtkEdgeType, std::__1::less<long long>,
   std::__1::allocator<std::__1::pair<const long long, vtkEdgeType> > > *>,
   boost::vtkGraphIndexMap, std::__1::map<long long, vtkEdgeType,
   std::__1::less<long long>, std::__1::allocator<std::__1::pair<const long
   long, vtkEdgeType> > >, std::__1::map<long long, vtkEdgeType,
   std::__1::less<long long>, std::__1::allocator<std::__1::pair<const long
   long, vtkEdgeType> > > &>'
   - /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::__wrap_iter<std::__1::map<long long,
   vtkEdgeType, std::__1::less<long long>,
   std::__1::allocator<std::__1::pair<const long long, vtkEdgeType> > > *>,
   boost::vtkGraphIndexMap, std::__1::map<long long, vtkEdgeType,
   std::__1::less<long long>, std::__1::allocator<std::__1::pair<const long
   long, vtkEdgeType> > >, std::__1::map<long long, vtkEdgeType,
   std::__1::less<long long>, std::__1::allocator<std::__1::pair<const long
   long, vtkEdgeType> > > &>'
   - /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::__wrap_iter<std::__1::set<long long,
   std::__1::less<long long>, std::__1::allocator<long long> > *>,
   boost::vtkGraphIndexMap, std::__1::set<long long, std::__1::less<long
   long>, std::__1::allocator<long long> >, std::__1::set<long long,
   std::__1::less<long long>, std::__1::allocator<long long> > &>'
   - /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::__wrap_iter<std::__1::set<long long,
   std::__1::less<long long>, std::__1::allocator<long long> > *>,
   boost::vtkGraphIndexMap, std::__1::set<long long, std::__1::less<long
   long>, std::__1::allocator<long long> >, std::__1::set<long long,
   std::__1::less<long long>, std::__1::allocator<long long> > &>'
   - /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<typename vertex_vector_t::iterator,
   boost::vtkGraphIndexMap>')

It seems I cannot provide an appropriate EdgeIndexMap parameter to the put
function in the 44th line. The vtkBoostGraphAdapter says that we can use
VTK arrays as property maps, I tried that one as well, with no success.
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141008/ff07db92/attachment.html>


More information about the vtkusers mailing list