File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,9 +138,7 @@ class adjacency_matrix final {
138138 }
139139
140140 [[nodiscard]] bool has_edge (const edge_type& edge) const {
141- const auto first_id = edge.first ();
142- const auto second_id = edge.second ();
143-
141+ const auto [first_id, second_id] = edge.incident_vertices ();
144142 if (not (this ->_is_valid_vertex_id (first_id) and this ->_is_valid_vertex_id (second_id)))
145143 return false ;
146144
Original file line number Diff line number Diff line change @@ -265,13 +265,10 @@ struct undirected_adjacency_matrix {
265265 detail::strict_get<impl_type>(self._matrix , &edge) = nullptr ;
266266 }
267267 else {
268- const auto first_id = edge.first ();
269- const auto second_id = edge.second ();
270-
271268 detail::strict_get<impl_type>(self._matrix , &edge) = nullptr ;
272269 // if the edge was found in the first matrix cell,
273270 // it will also be present in the second matrix cell
274- self._matrix [second_id][first_id ] = nullptr ;
271+ self._matrix [edge. second ()][edge. first () ] = nullptr ;
275272 }
276273 --self._n_unique_edges ;
277274 }
You can’t perform that action at this time.
0 commit comments