Boost C++ Libraries: Ticket #4087: boost::fruchterman_reingold_force_directed_layout fails compiling https://svn.boost.org/trac10/ticket/4087 <p> After I have tried to build a small example for running layout algorithm I have found out that boost::fruchterman_reingold_force_directed_layout fails compiling of source code. </p> <p> I have used following example: <a class="ext-link" href="http://www.systut.com/?p=24095"><span class="icon">​</span>http://www.systut.com/?p=24095</a> </p> <p> Compile error and source code is attached as seperate file. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4087 Trac 1.4.3 Wolfgang Forstmeier <wolfgang.forstmeier@…> Mon, 12 Apr 2010 12:33:07 GMT attachment set https://svn.boost.org/trac10/ticket/4087 https://svn.boost.org/trac10/ticket/4087 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">fruchterman_reingold_force_directed_layout error.txt</span> </li> </ul> Ticket Wolfgang Forstmeier <wolfgang.forstmeier@…> Mon, 12 Apr 2010 12:34:20 GMT <link>https://svn.boost.org/trac10/ticket/4087#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4087#comment:1</guid> <description> <p> I forgot to add following details: </p> <p> OS: Windows XP Compiler: Visual Studio 2005 SP2 Boost version: 1.42.0 </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Jeremiah Willcock</dc:creator> <pubDate>Mon, 12 Apr 2010 12:47:05 GMT</pubDate> <title>owner changed https://svn.boost.org/trac10/ticket/4087#comment:2 https://svn.boost.org/trac10/ticket/4087#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Andrew Sutton</span> to <span class="trac-author">Jeremiah Willcock</span> </li> </ul> <p> Some of the interfaces changed in more recent versions of Boost. The F-R example you posted seems to use the new interface, though, but the K-K one doesn't. I'll take a look later today, though. </p> Ticket Jeremiah Willcock Mon, 12 Apr 2010 20:16:34 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4087#comment:3 https://svn.boost.org/trac10/ticket/4087#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> The F-R function requires a displacement map or a vertex index map (used to create an internal displacement map). Adding boost::vertex_index_map(vertexIdMap) as the last argument to boost::fruchterman_reingold_force_directed_layout makes the code work. By the way, vertex indices need to be numbers from 0 to num_vertices(g)-1, and so the numbers you are putting into that property map have an incorrect range. </p> Ticket