File tree Expand file tree Collapse file tree 2 files changed +4
-12
lines changed
Expand file tree Collapse file tree 2 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ namespace cp_algo::graph {
1818 graph<edge_t , mode> gt (n (), v0);
1919 for (auto v: nodes ()) {
2020 for (auto e: outgoing (v)) {
21- gt.add_edge (edge (e).traverse (v), edge (e). backedge () );
21+ gt.add_edge (edge (e).traverse (v), edge (e));
2222 }
2323 }
2424 return gt;
Original file line number Diff line number Diff line change 55namespace cp_algo ::graph {
66 using node_index = int ;
77 struct edge_base {
8- node_index xor_endpoints ;
8+ int xor_nodes ;
99
1010 edge_base () {}
11- edge_base (node_index from, node_index to): xor_endpoints (from ^ to) {}
11+ edge_base (node_index from, node_index to): xor_nodes (from ^ to) {}
1212
1313 // Given one endpoint, return the other
1414 node_index traverse (node_index from) const {
15- return xor_endpoints ^ from;
15+ return xor_nodes ^ from;
1616 }
1717
1818 static auto read (node_index v0 = 0 ) {
@@ -22,10 +22,6 @@ namespace cp_algo::graph {
2222 v -= v0;
2323 return std::pair{u, edge_base (u, v)};
2424 }
25-
26- edge_base backedge () const {
27- return *this ;
28- }
2925 };
3026
3127 struct weighted_edge : edge_base {
@@ -40,10 +36,6 @@ namespace cp_algo::graph {
4036 std::cin >> w;
4137 return std::pair{u, weighted_edge (u, e.traverse (u), w)};
4238 }
43-
44- weighted_edge backedge () const {
45- return *this ;
46- }
4739 };
4840
4941 template <typename edge>
You can’t perform that action at this time.
0 commit comments