Skip to content

Commit 4d36e39

Browse files
pratzlgithub-actions[bot]
authored andcommitted
:octocat: Applied clang-format.
1 parent 8fe468a commit 4d36e39

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

include/graph/algorithm/experimental/visitor_dijkstra.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ void dijkstra_with_visitor(
228228
Compare&& compare = less<ranges::range_value_t<Distances>>(),
229229
Combine&& combine = plus<ranges::range_value_t<Distances>>(),
230230
Queue queue = Queue()) {
231-
dijkstra_with_visitor(g_, forward<Visitor>(visitor), ranges::subrange(&seed, (&seed + 1)), predecessor,
232-
distances, weight, forward<Compare>(compare), forward<Combine>(combine), queue);
231+
dijkstra_with_visitor(g_, forward<Visitor>(visitor), ranges::subrange(&seed, (&seed + 1)), predecessor, distances,
232+
weight, forward<Compare>(compare), forward<Combine>(combine), queue);
233233
}
234234

235235
} // namespace std::graph::experimental

include/graph/container/compressed_graph.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ class csr_row_values<EV, void, GV, VId, EIndex, Alloc> {
231231
using value_type = void;
232232
using size_type = size_t; //VId;
233233

234-
public: // Properties
234+
public: // Properties
235235
[[nodiscard]] constexpr size_type size() const noexcept { return 0; }
236236
[[nodiscard]] constexpr bool empty() const noexcept { return true; }
237237
[[nodiscard]] constexpr size_type capacity() const noexcept { return 0; }
@@ -343,7 +343,7 @@ class csr_col_values<void, VV, GV, VId, EIndex, Alloc> {
343343
using value_type = void;
344344
using size_type = size_t; //VId;
345345

346-
public: // Properties
346+
public: // Properties
347347
[[nodiscard]] constexpr size_type size() const noexcept { return 0; }
348348
[[nodiscard]] constexpr bool empty() const noexcept { return true; }
349349
[[nodiscard]] constexpr size_type capacity() const noexcept { return 0; }
@@ -516,7 +516,7 @@ class compressed_graph_base
516516
}
517517

518518
public:
519-
public: // Operations
519+
public: // Operations
520520
void reserve_vertices(size_type count) {
521521
row_index_.reserve(count + 1); // +1 for terminating row
522522
row_values_base::reserve(count);
@@ -803,13 +803,13 @@ class compressed_graph_base
803803
private: // CPO properties
804804
friend constexpr vertices_type vertices(compressed_graph_base& g) {
805805
if (g.row_index_.empty())
806-
return vertices_type(g.row_index_); // really empty
806+
return vertices_type(g.row_index_); // really empty
807807
else
808808
return vertices_type(g.row_index_.begin(), g.row_index_.end() - 1); // don't include terminating row
809809
}
810810
friend constexpr const_vertices_type vertices(const compressed_graph_base& g) {
811811
if (g.row_index_.empty())
812-
return const_vertices_type(g.row_index_); // really empty
812+
return const_vertices_type(g.row_index_); // really empty
813813
else
814814
return const_vertices_type(g.row_index_.begin(), g.row_index_.end() - 1); // don't include terminating row
815815
}
@@ -826,15 +826,15 @@ class compressed_graph_base
826826
friend constexpr edges_type edges(graph_type& g, vertex_type& u) {
827827
static_assert(ranges::contiguous_range<row_index_vector>, "row_index_ must be a contiguous range to get next row");
828828
vertex_type* u2 = &u + 1;
829-
assert(static_cast<size_t>(u2 - &u) < g.row_index_.size()); // in row_index_ bounds?
829+
assert(static_cast<size_t>(u2 - &u) < g.row_index_.size()); // in row_index_ bounds?
830830
assert(static_cast<size_t>(u.index) <= g.col_index_.size() &&
831831
static_cast<size_t>(u2->index) <= g.col_index_.size()); // in col_index_ bounds?
832832
return edges_type(g.col_index_.begin() + u.index, g.col_index_.begin() + u2->index);
833833
}
834834
friend constexpr const_edges_type edges(const graph_type& g, const vertex_type& u) {
835835
static_assert(ranges::contiguous_range<row_index_vector>, "row_index_ must be a contiguous range to get next row");
836836
const vertex_type* u2 = &u + 1;
837-
assert(static_cast<size_t>(u2 - &u) < g.row_index_.size()); // in row_index_ bounds?
837+
assert(static_cast<size_t>(u2 - &u) < g.row_index_.size()); // in row_index_ bounds?
838838
assert(static_cast<size_t>(u.index) <= g.col_index_.size() &&
839839
static_cast<size_t>(u2->index) <= g.col_index_.size()); // in col_index_ bounds?
840840
return const_edges_type(g.col_index_.begin() + u.index, g.col_index_.begin() + u2->index);

include/graph/container/dynamic_graph.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,7 @@ class dynamic_graph_base {
12541254
constexpr typename vertices_type::value_type& operator[](size_type i) noexcept { return vertices_[i]; }
12551255
constexpr const typename vertices_type::value_type& operator[](size_type i) const noexcept { return vertices_[i]; }
12561256

1257-
public: // Operations
1257+
public: // Operations
12581258
void reserve_vertices(size_type count) {
12591259
if constexpr (reservable<vertices_type>) // reserve if we can; otherwise ignored
12601260
vertices_.reserve(count);
@@ -1271,13 +1271,13 @@ class dynamic_graph_base {
12711271
// ignored for this graph; may be meaningful for another data structure like CSR
12721272
}
12731273

1274-
private: // Member Variables
1274+
private: // Member Variables
12751275
vertices_type vertices_;
12761276
partition_vector partition_; // partition_[n] holds the first vertex id for each partition n
12771277
// holds +1 extra terminating partition
12781278
size_t edge_count_ = 0; // total number of edges in the graph
12791279

1280-
private: // CPO properties
1280+
private: // CPO properties
12811281
friend constexpr vertices_type& vertices(dynamic_graph_base& g) { return g.vertices_; }
12821282
friend constexpr const vertices_type& vertices(const dynamic_graph_base& g) { return g.vertices_; }
12831283

@@ -1732,7 +1732,7 @@ class dynamic_graph : public dynamic_graph_base<EV, VV, GV, VId, Sourced, Traits
17321732
private:
17331733
value_type value_; ///< Graph value
17341734

1735-
private: // CPO properties
1735+
private: // CPO properties
17361736
friend constexpr value_type& graph_value(graph_type& g) { return g.value_; }
17371737
friend constexpr const value_type& graph_value(const graph_type& g) { return g.value_; }
17381738
};

tests/co_dijkstra_tests.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ TEST_CASE("co_dijstra_clrs test", "[dynamic][dijkstra][bfs][vertex][coroutine]")
8181

8282
SECTION("co_dijkstra fnc vertices") {
8383
auto distance = [&g](edge_reference_t<G> uv) -> double { return edge_value(g, uv); };
84-
for (auto bfs = co_dijkstra(g, dijkstra_events::discover_vertex, seeds, predecessors, distances, distance);
85-
bfs;) {
84+
for (auto bfs = co_dijkstra(g, dijkstra_events::discover_vertex, seeds, predecessors, distances, distance); bfs;) {
8685
auto&& [event, payload] = bfs();
8786
switch (event) {
8887
case dijkstra_events::discover_vertex: {

0 commit comments

Comments
 (0)