Opened 13 years ago
Closed 13 years ago
#4087 closed Bugs (invalid)
boost::fruchterman_reingold_force_directed_layout fails compiling
Reported by: | Owned by: | Jeremiah Willcock | |
---|---|---|---|
Milestone: | Boost 1.43.0 | Component: | graph |
Version: | Boost 1.42.0 | Severity: | Showstopper |
Keywords: | Cc: |
Description
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.
I have used following example: http://www.systut.com/?p=24095
Compile error and source code is attached as seperate file.
Attachments (1)
Change History (4)
by , 13 years ago
Attachment: | fruchterman_reingold_force_directed_layout error.txt added |
---|
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Owner: | changed from | to
---|
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.
comment:3 by , 13 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
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.
I forgot to add following details:
OS: Windows XP Compiler: Visual Studio 2005 SP2 Boost version: 1.42.0