From e3b663588a30ec4f05afe50c260982bd44a1bb2b Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Thu, 24 Jan 2019 19:01:18 -0500 Subject: style changes --- src/analysis_tools.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/analysis_tools.cpp') diff --git a/src/analysis_tools.cpp b/src/analysis_tools.cpp index 34e4ea0..778e713 100644 --- a/src/analysis_tools.cpp +++ b/src/analysis_tools.cpp @@ -10,16 +10,16 @@ bool trivial(boost::detail::edge_desc_impl) return true; } -std::list find_minimal_crack(const Graph& G, const network& n) { +std::list find_minimal_crack(const Graph& G, const network& n) { Graph Gtmp(n.G.vertices.size()); - std::list removed_edges; + std::list removed_edges; class add_tree_edges : public boost::default_dfs_visitor { public: Graph& G; - std::list& E; + std::list& E; - add_tree_edges(Graph& G, std::list& E) : G(G), E(E) {} + add_tree_edges(Graph& G, std::list& E) : G(G), E(E) {} void tree_edge(boost::graph_traits::edge_descriptor e, const Graph& g) { boost::add_edge(boost::source(e, g), boost::target(e, g), g[e], G); @@ -37,11 +37,11 @@ std::list find_minimal_crack(const Graph& G, const network& n) { class find_cycle : public boost::default_dfs_visitor { public: - std::list& E; - unsigned int end; + std::list& E; + unsigned end; struct done{}; - find_cycle(std::list& E, unsigned int end) : E(E), end(end) {} + find_cycle(std::list& E, unsigned end) : E(E), end(end) {} void discover_vertex(boost::graph_traits::vertex_descriptor v, const Graph& g) { if (v == end) { @@ -58,10 +58,10 @@ std::list find_minimal_crack(const Graph& G, const network& n) { } }; - std::list> cycles; + std::list> cycles; for (auto edge : removed_edges) { - std::list cycle = {edge}; + std::list cycle = {edge}; find_cycle vis(cycle, n.G.dual_edges[edge].v[1]); std::vector new_color_map(boost::num_vertices(Gtmp)); try { @@ -85,8 +85,8 @@ std::list find_minimal_crack(const Graph& G, const network& n) { for (auto it1 = bool_cycles.begin(); it1 != std::prev(bool_cycles.end()); it1++) { for (auto it2 = std::next(it1); it2 != bool_cycles.end(); it2++) { std::valarray new_bool_cycle = (*it1) ^ (*it2); - std::list new_cycle; - unsigned int pos = 0; + std::list new_cycle; + unsigned pos = 0; for (uint8_t included : new_bool_cycle) { if (included) { new_cycle.push_back(pos); @@ -99,7 +99,7 @@ std::list find_minimal_crack(const Graph& G, const network& n) { // find the cycle representing the crack by counting boundary crossings for (auto cycle : cycles) { - std::array crossing_count{0,0}; + std::array crossing_count{0,0}; for (auto edge : cycle) { if (n.G.dual_edges[edge].crossings[0]) { -- cgit v1.2.3-70-g09d2