From d2c82c8e66146825387e692a504860ccd0571259 Mon Sep 17 00:00:00 2001 From: Andrea Cassioli Date: Mon, 30 Mar 2026 18:42:11 +0200 Subject: [PATCH 1/5] fix docs --- doc/circle_layout.html | 39 ++++++++++++++++++++++----- include/boost/graph/circle_layout.hpp | 4 +-- 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/doc/circle_layout.html b/doc/circle_layout.html index 57f91cb9c..d57d7043f 100644 --- a/doc/circle_layout.html +++ b/doc/circle_layout.html @@ -1,16 +1,41 @@ - -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. + +Boost Graph Library: Dijkstra's Shortest Paths + +C++ Boost -

Parameters

+
+ +

(Python) +circle_layout +

+ +

+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. + +

Parameters

IN: const VertexListGraph& g
The graph object on which the algorithm will be applied. The type diff --git a/include/boost/graph/circle_layout.hpp b/include/boost/graph/circle_layout.hpp index f295bd20b..0df23a6c6 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,8 +41,7 @@ void circle_graph_layout( using std::sin; #endif // BOOST_NO_STDC_NAMESPACE - typedef typename graph_traits< VertexListGraph >::vertices_size_type - vertices_size_type; + using vertices_size_type = typename graph_traits< VertexListGraph >::vertices_size_type; vertices_size_type n = num_vertices(g); From a466abb35a114b5ee9859ef5d187c8d8c4af95e3 Mon Sep 17 00:00:00 2001 From: Andrea Cassioli Date: Sat, 11 Apr 2026 21:00:39 +0200 Subject: [PATCH 2/5] fix synopsis --- doc/circle_layout.html | 39 +++++++-------------------------------- 1 file changed, 7 insertions(+), 32 deletions(-) diff --git a/doc/circle_layout.html b/doc/circle_layout.html index d57d7043f..57f91cb9c 100644 --- a/doc/circle_layout.html +++ b/doc/circle_layout.html @@ -1,41 +1,16 @@ - - - -Boost Graph Library: Dijkstra's Shortest Paths - -C++ Boost +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. -
- -

(Python) -circle_layout -

- -

-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. - -

Parameters

+

Parameters

IN: const VertexListGraph& g
The graph object on which the algorithm will be applied. The type From 4e51deab5b1c2f5f313653b8449a4c6b0dcd398a Mon Sep 17 00:00:00 2001 From: Andrea Cassioli Date: Sat, 11 Apr 2026 21:01:02 +0200 Subject: [PATCH 3/5] fix synopsis --- doc/circle_layout.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 From 4188686303300724922abcb1e146c4c2c09ab8c6 Mon Sep 17 00:00:00 2001 From: Andrea Cassioli Date: Sat, 11 Apr 2026 21:07:34 +0200 Subject: [PATCH 4/5] add a const --- include/boost/graph/circle_layout.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/graph/circle_layout.hpp b/include/boost/graph/circle_layout.hpp index 0df23a6c6..9a63dc9b0 100644 --- a/include/boost/graph/circle_layout.hpp +++ b/include/boost/graph/circle_layout.hpp @@ -46,7 +46,7 @@ void circle_graph_layout( vertices_size_type n = num_vertices(g); vertices_size_type i = 0; - double two_pi_over_n = 2. * pi / n; + 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); From 8acad90b83a51813a15a511e714dadc1fdef2def Mon Sep 17 00:00:00 2001 From: Andrea Cassioli Date: Mon, 13 Apr 2026 22:15:42 +0200 Subject: [PATCH 5/5] more auto --- include/boost/graph/circle_layout.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/boost/graph/circle_layout.hpp b/include/boost/graph/circle_layout.hpp index 9a63dc9b0..ca9474601 100644 --- a/include/boost/graph/circle_layout.hpp +++ b/include/boost/graph/circle_layout.hpp @@ -41,11 +41,9 @@ void circle_graph_layout( using std::sin; #endif // BOOST_NO_STDC_NAMESPACE - using vertices_size_type = typename graph_traits< VertexListGraph >::vertices_size_type; + const auto n = num_vertices(g); - vertices_size_type n = num_vertices(g); - - vertices_size_type i = 0; + auto i = 0; const auto two_pi_over_n = 2. * pi / n; BGL_FORALL_VERTICES_T(v, g, VertexListGraph) {