Re: [Boost-users] Kamada kawai spring layout algorithm
Meththa wrote: I want to use the Kamada Kawai spring layout algorithm and I do not know what to pass for the final parameter when calling the function. the template of the function is given below.
*template*<*typename* Graph, *typename* PositionMap, *typename* WeightMap, *typename* T, *bool* EdgeOrSideLength> *bool* kamada_kawai_spring_layout(*const* Graph & g, PositionMap position, WeightMap weight, /unspecified/ edge_or_side_length); I do not understand what value needs to be given and what type for /unspecified edge_or_side_length./ // Can someone please point me in the right direction with regards to this.
If you want the side of the bounding box to be of length "s", pass boost::side_length(s) If you want the "normal" edge length to be e, pass boost::edge_length(e).
- Doug
Is the bouding box the placement area? I tried both ways you have suggested above and i can't seem to get rid of the compiler errors. If I leave boost::side_length(s) as it is, the compiler complains 's' is not instantiated. If I give a value instead of 's', it complains as follows.
C:/boost_1_34_1/boost/graph/kamada_kawai_spring_layout.hpp: In function `bool
boost::kamada_kawai_spring_layout(const Graph&, PositionMap, WeightMap,
boost::detail::graph::edge_or_side
participants (1)
-
Meththa