diff --git a/doc/circle_layout.html b/doc/circle_layout.html index 57f91cb9c..f0594e606 100644 --- a/doc/circle_layout.html +++ b/doc/circle_layout.html @@ -7,8 +7,7 @@ --> Function template circle_graph_layout
boost.png (6897 bytes)HomeLibrariesPeopleFAQMore

(Python)Function template circle_graph_layout

boost::circle_graph_layout — Layout the graph with the vertices at the points of a regular n-polygon.

Synopsis

 template<typename VertexListGraph, typename PositionMap, typename Radius>
-  void circle_graph_layout(const VertexListGraph & g, PositionMap position,
-                           Radius radius);

Where Defined

boost/graph/circle_layout.hpp

Description

The distance from the center of the polygon to each point is determined by the radius parameter. The position parameter must be an Lvalue Property Map whose value type is a class type containing x and y members that will be set to the x and y coordinates. +void circle_graph_layout(const VertexListGraph & g, PositionMap position, Radius radius);

Where Defined

boost/graph/circle_layout.hpp

Description

The distance from the center of the polygon to each point is determined by the radius parameter. The position parameter must be an Lvalue Property Map whose value type is a class type containing x and y members that will be set to the x and y coordinates.

Parameters

IN: const VertexListGraph& g diff --git a/include/boost/graph/circle_layout.hpp b/include/boost/graph/circle_layout.hpp index f295bd20b..ca9474601 100644 --- a/include/boost/graph/circle_layout.hpp +++ b/include/boost/graph/circle_layout.hpp @@ -10,7 +10,6 @@ #define BOOST_GRAPH_CIRCLE_LAYOUT_HPP #include #include -#include #include #include #include @@ -42,13 +41,10 @@ void circle_graph_layout( using std::sin; #endif // BOOST_NO_STDC_NAMESPACE - typedef typename graph_traits< VertexListGraph >::vertices_size_type - vertices_size_type; + const auto n = num_vertices(g); - vertices_size_type n = num_vertices(g); - - vertices_size_type i = 0; - double two_pi_over_n = 2. * pi / n; + auto i = 0; + const auto two_pi_over_n = 2. * pi / n; BGL_FORALL_VERTICES_T(v, g, VertexListGraph) { position[v][0] = radius * cos(i * two_pi_over_n);