Boost logo

Boost Users :

Subject: Re: [Boost-users] Using metric_tsp_approx with bundled properties
From: Alexis Praga (alexispraga_at_[hidden])
Date: 2014-04-15 04:53:45

> After your first named argument, you need to use named arguments for the rest of the argument list:
> metric_tsp_approx(g_init,
>     weight_map(...).vertex_index_map(...).visitor(...));
> Fixing that might fix your compilation errors.
> -- Jeremiah Willcock

Jeremiah : could you explain why you need named arguments ? I find
that very confusing !
Also, I'm having trouble creating a visitor. I tried :

    weight_map(get(&Road::length, g_init)).vertex_index_map(get(&City::id, g_init))

But compiling raises the error :
     has no member named ‘make_tsp_tour_visitor’

Should I create a class for the visitor ?

Albert : I have included a small example as an attached file.

Alexis Praga, PhD Student (CERFACS)
GPG key : AD4A AF6D BB5C 042F 9422  1223 06E1 C1BF E287 65D0

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at