From e17d6f9ff8313d476f9c2470e0921230675c43ce Mon Sep 17 00:00:00 2001
From: Sven Gato Redsun
Date: Thu, 9 Mar 2023 18:17:35 -0700
Subject: [PATCH] Use snake case (max_length) for style consistency
---
doc/hawick_circuits.html | 10 ++++----
include/boost/graph/hawick_circuits.hpp | 34 ++++++++++++-------------
2 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/doc/hawick_circuits.html b/doc/hawick_circuits.html
index 100b038b..fb1457ac 100644
--- a/doc/hawick_circuits.html
+++ b/doc/hawick_circuits.html
@@ -13,13 +13,13 @@
hawick_circuits
template <typename Graph, typename Visitor, typename VertexIndexMap>
-void hawick_circuits(Graph const& graph, Visitor visitor, VertexIndexMap const& vim = get(vertex_index, graph), unsigned int const maxLength = 0);
+void hawick_circuits(Graph const& graph, Visitor visitor, VertexIndexMap const& vim = get(vertex_index, graph), unsigned int const max_length = 0);
template <typename Graph, typename Visitor, typename VertexIndexMap>
-void hawick_unique_circuits(Graph const& graph, Visitor visitor, VertexIndexMap const& vim = get(vertex_index, graph), unsigned int const maxLength = 0);
+void hawick_unique_circuits(Graph const& graph, Visitor visitor, VertexIndexMap const& vim = get(vertex_index, graph), unsigned int const max_length = 0);
-Enumerate all the elementary circuits (of length ≤ maxLength
, if nonzero) in a directed multigraph. Specifically,
+
Enumerate all the elementary circuits (of length ≤ max_length
, if nonzero) in a directed multigraph. Specifically,
self-loops and redundant circuits caused by parallel edges are enumerated too.
hawick_unique_circuits
may be used if redundant circuits caused by parallel
edges are not desired.
@@ -59,10 +59,10 @@ edges are not desired.
the vertex index map provided by the graph
.
-IN: unsigned int const maxLength = 0
+IN: unsigned int const max_length = 0
- The maximum circuit length to consider. Beyond this it truncates the depth-first search, reducing the computation time by ignoring longer circuits. The default value of maxLength = 0
implies no maximum.
+ The maximum circuit length to consider. Beyond this it truncates the depth-first search, reducing the computation time by ignoring longer circuits. The default value of max_length = 0
implies no maximum.
diff --git a/include/boost/graph/hawick_circuits.hpp b/include/boost/graph/hawick_circuits.hpp
index 91cd377f..0ec1ece9 100644
--- a/include/boost/graph/hawick_circuits.hpp
+++ b/include/boost/graph/hawick_circuits.hpp
@@ -153,14 +153,14 @@ namespace hawick_circuits_detail
public:
hawick_circuits_from(Graph const& graph, Visitor& visitor,
VertexIndexMap const& vim, Stack& stack, ClosedMatrix& closed,
- VerticesSize n_vertices, unsigned int const maxLength)
+ VerticesSize n_vertices, unsigned int const max_length)
: graph_(graph)
, visitor_(visitor)
, vim_(vim)
, stack_(stack)
, closed_(closed)
, blocked_(n_vertices, vim_)
- , maxLength_(maxLength)
+ , max_length_(max_length)
{
BOOST_ASSERT(blocked_map_starts_all_unblocked());
@@ -225,9 +225,9 @@ namespace hawick_circuits_detail
stack_.push_back(v);
block(v);
- // Truncate the search if any circuits would exceed maxLength_.
+ // Truncate the search if any circuits would exceed max_length_.
bool const truncate_search =
- (maxLength_ > 0 && stack_.size() >= maxLength_);
+ (max_length_ > 0 && stack_.size() >= max_length_);
// Cache some values that are used more than once in the function.
VertexIndex const index_of_start = index_of(start);
@@ -298,14 +298,14 @@ namespace hawick_circuits_detail
Stack& stack_;
ClosedMatrix& closed_;
BlockedMap blocked_;
- unsigned int const maxLength_;
+ unsigned int const max_length_;
};
template < typename GetAdjacentVertices, typename Graph, typename Visitor,
typename VertexIndexMap >
void call_hawick_circuits(Graph const& graph,
Visitor /* by value */ visitor, VertexIndexMap const& vertex_index_map,
- unsigned int const maxLength)
+ unsigned int const max_length)
{
typedef graph_traits< Graph > Traits;
typedef typename Traits::vertex_descriptor Vertex;
@@ -336,7 +336,7 @@ namespace hawick_circuits_detail
// member variables of the sub algorithm.
SubAlgorithm sub_algo(
graph, visitor, vertex_index_map, stack, closed, n_vertices,
- maxLength);
+ max_length);
sub_algo(*start);
stack.clear();
typename ClosedMatrix::iterator row, last_row = closed.end();
@@ -348,11 +348,11 @@ namespace hawick_circuits_detail
template < typename GetAdjacentVertices, typename Graph, typename Visitor >
void call_hawick_circuits(
Graph const& graph, BOOST_FWD_REF(Visitor) visitor,
- unsigned int const maxLength)
+ unsigned int const max_length)
{
call_hawick_circuits< GetAdjacentVertices >(graph,
boost::forward< Visitor >(visitor), get(vertex_index, graph),
- maxLength);
+ max_length);
}
} // end namespace hawick_circuits_detail
@@ -360,22 +360,22 @@ namespace hawick_circuits_detail
template < typename Graph, typename Visitor, typename VertexIndexMap >
void hawick_circuits(BOOST_FWD_REF(Graph) graph, BOOST_FWD_REF(Visitor) visitor,
BOOST_FWD_REF(VertexIndexMap) vertex_index_map,
- unsigned int const maxLength = 0)
+ unsigned int const max_length = 0)
{
hawick_circuits_detail::call_hawick_circuits<
hawick_circuits_detail::get_all_adjacent_vertices >(
boost::forward< Graph >(graph), boost::forward< Visitor >(visitor),
- boost::forward< VertexIndexMap >(vertex_index_map), maxLength);
+ boost::forward< VertexIndexMap >(vertex_index_map), max_length);
}
template < typename Graph, typename Visitor >
void hawick_circuits(BOOST_FWD_REF(Graph) graph, BOOST_FWD_REF(Visitor) visitor,
- unsigned int const maxLength = 0)
+ unsigned int const max_length = 0)
{
hawick_circuits_detail::call_hawick_circuits<
hawick_circuits_detail::get_all_adjacent_vertices >(
boost::forward< Graph >(graph), boost::forward< Visitor >(visitor),
- maxLength);
+ max_length);
}
/*!
@@ -386,23 +386,23 @@ template < typename Graph, typename Visitor, typename VertexIndexMap >
void hawick_unique_circuits(BOOST_FWD_REF(Graph) graph,
BOOST_FWD_REF(Visitor) visitor,
BOOST_FWD_REF(VertexIndexMap) vertex_index_map,
- unsigned int const maxLength = 0)
+ unsigned int const max_length = 0)
{
hawick_circuits_detail::call_hawick_circuits<
hawick_circuits_detail::get_unique_adjacent_vertices >(
boost::forward< Graph >(graph), boost::forward< Visitor >(visitor),
- boost::forward< VertexIndexMap >(vertex_index_map), maxLength);
+ boost::forward< VertexIndexMap >(vertex_index_map), max_length);
}
template < typename Graph, typename Visitor >
void hawick_unique_circuits(
BOOST_FWD_REF(Graph) graph, BOOST_FWD_REF(Visitor) visitor,
- unsigned int const maxLength = 0)
+ unsigned int const max_length = 0)
{
hawick_circuits_detail::call_hawick_circuits<
hawick_circuits_detail::get_unique_adjacent_vertices >(
boost::forward< Graph >(graph), boost::forward< Visitor >(visitor),
- maxLength);
+ max_length);
}
} // end namespace boost