Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force-directed layout implementation in C++

Are you aware of an open source implementation of force-directed layout in C++ used for GUIs? Preferably BSD/MIT/Apache or other (non-GPL) license.

like image 481
amit kumar Avatar asked Apr 03 '09 12:04

amit kumar


3 Answers

The excellent Boost.Graph library provides a wide range of algorithms, among which a few layout algorithms. I'd recommend using either Kamada-Kawai spring layout or Fruchterman-Reingold force-directed layout.

Boost licence is very permissive so don't worry about that.

like image 188
Benoît Avatar answered Nov 09 '22 06:11

Benoît


The first Google result is VTK. Another takes me to vtkGraphLayoutView.

like image 30
dirkgently Avatar answered Nov 09 '22 05:11

dirkgently


Have you looked at neato from graphviz. This guide even goes into detail for using graphviz as a library. The guide includes using the fdp layout algorithm, which appears to be exactly what you want. All of graphviz falls under the Common Public License.

like image 4
grieve Avatar answered Nov 09 '22 06:11

grieve