>>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<EdgeOrSideLength, T>) [with Graph =
   Graph, PositionMap =
   boost::iterator_property_map<__gnu_cxx::__normal_iterator<boost::simple_point<double>*,
   std::vector<boost::simple_point<double>,
   std::allocator<boost::simple_point<double> > > >,
   boost::vec_adj_list_vertex_id_map<boost::no_property, size_t>,
   boost::simple_point<double>, boost::simple_point<double>&>, WeightMap =
   boost::adj_list_edge_property_map<boost::undirected_tag,
   boost::detail::error_property_not_found,
   boost::detail::error_property_not_found&, size_t, boost::no_property,
   boost::edge_weight_t>, T = int, bool EdgeOrSideLength = false]':
main2.cpp:57:   instantiated from here
C:/boost_1_34_1/boost/graph/kamada_kawai_spring_layout.hpp:535: no matching
   function for call to `boost::detail::error_property_not_found::
   error_property_not_found(double)'
Can you shed some light on this please.
 
Thanks - Meththa


Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.