<div dir="ltr">Hi All,<div><br></div><div>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 <i>Boyer-Myrvold planarity test</i> (Boost implementation) through the <font face="courier new, monospace">vtkBoostGraphAdapter</font>. That works fine (only on <font face="courier new, monospace">vtkUndirectedGraph</font>-s but that's OK for now).</div><div>(<a href="http://www.boost.org/doc/libs/1_56_0/libs/graph/doc/boyer_myrvold.html">http://www.boost.org/doc/libs/1_56_0/libs/graph/doc/boyer_myrvold.html</a>)</div><div><br></div><div>To create the dual I need to traverse the faces of the planar graph for which I also have a Boost tool called the <font face="courier new, monospace">planar_face_traversal_visitor</font>.</div><div>(<a href="http://www.boost.org/doc/libs/1_56_0/libs/graph/doc/planar_face_traversal.html">http://www.boost.org/doc/libs/1_56_0/libs/graph/doc/planar_face_traversal.html</a>)</div><div>There's a guy, Aaron Windsor who implemented the appropriate visitor class that is able to create the dual of a graph in Boost.</div><div>(<a href="https://github.com/aaw/boost_planar_graph_dual">https://github.com/aaw/boost_planar_graph_dual</a>)</div><div>That also works fine using only Boost but I'd like to adapt this feature as well using <font face="courier new, monospace">vtkBoostGraphAdapter</font>.</div><div><br></div><div>Here's my code: <a href="http://pastebin.com/g0Mtw6Ph">http://pastebin.com/g0Mtw6Ph</a></div><div><br></div><div>These are my errors:</div><div><ul><li><b>vtkDualGraph.cpp</b>:44:9: No matching function for call to 'put'<br></li><li>/usr/local/boost_1_56_0/boost/property_map/<b>property_map.hpp</b>: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> > > &>'<br></li><li>/usr/local/boost_1_56_0/boost/property_map/<b>property_map.hpp</b>: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> > > &>'<br></li><li>/usr/local/boost_1_56_0/boost/property_map/<b>property_map.hpp</b>: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> > &>'<br></li><li>/usr/local/boost_1_56_0/boost/property_map/<b>property_map.hpp</b>: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> > &>'<br></li><li>/usr/local/boost_1_56_0/boost/<b>planar_dual.hpp</b>:38:38: No viable overloaded operator[] for type 'edge_to_face_map_t' (aka 'iterator_property_map<typename vertex_vector_t::iterator, boost::vtkGraphIndexMap>')<br></li></ul><div>It seems I cannot provide an appropriate <font face="courier new, monospace">EdgeIndexMap</font> parameter to the put function in the 44th line. The <font face="courier new, monospace">vtkBoostGraphAdapter</font> 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 <font face="courier new, monospace">vtkBoostGraphAdapter</font> properly prepared for this kind of usage?</div><div><br></div><div>Any kind of help appreciated!</div></div><div><br></div><div>Thanks in advance!</div><div><br></div><div>Szilard</div></div>