public static void connectAllEuclidean <VertexListGraph, PointContainer, WeightMap, VertexIndexMap>(VertexListGraph g, PointContainer points, WeightMap wmap, VertexIndexMap vmap) // Property maps passed by value { graph_traits <VertexListGraph> .edge_descriptor e = new graph_traits <VertexListGraph> .edge_descriptor(); bool inserted; Tuple <typename graph_traits <VertexListGraph> .vertex_iterator, typename graph_traits <VertexListGraph> .vertex_iterator> verts = new Tuple <typename graph_traits <VertexListGraph> .vertex_iterator, typename graph_traits <VertexListGraph> .vertex_iterator>(vertices(g).Item1, vertices(g).Item2); for (typename src = verts.Item1; src != verts.Item2; src++) { for (typename dest = src; dest != verts.Item2; dest++) { if (dest != src) { double weight = Math.Sqrt(Math.Pow((double)(points[vmap[*src]].x - points[vmap[*dest]].x), 2.0) + Math.Pow((double)(points[vmap[*dest]].y - points[vmap[*src]].y), 2.0)); boost::tie(e, inserted) = add_edge(*src, *dest, g); wmap[e] = weight; // passed by value?? } } } }
//C++ TO C# CONVERTER TODO TASK: The original C++ template specifier was replaced with a C# generic specifier, which may not produce the same behavior: //ORIGINAL LINE: template<typename M> public static void delete_endgame <M>(typename M.value_type p)