@@ -197,11 +197,13 @@ class adjacency_matrix final {
197197 {
198198 return std::views::iota (initial_id_v<id_type>, this ->_matrix .size ())
199199 | std::views::filter ([this , vertex_id](const auto source_id) {
200- return this -> _matrix [ to_idx ( source_id)][ to_idx ( vertex_id)] != invalid_id;
200+ return specialized_impl::get_edge_id (* this , source_id, vertex_id) != invalid_id;
201201 })
202202 | std::views::transform ([this , vertex_id](const auto source_id) {
203203 return edge_type{
204- this ->_matrix [to_idx (source_id)][to_idx (vertex_id)], source_id, vertex_id
204+ specialized_impl::get_edge_id (*this , source_id, vertex_id),
205+ source_id,
206+ vertex_id
205207 };
206208 });
207209 }
@@ -213,10 +215,10 @@ class adjacency_matrix final {
213215 {
214216 return std::views::iota (initial_id_v<id_type>, this ->_matrix .size ())
215217 | std::views::filter ([this , vertex_id](const auto source_id) {
216- return this -> _matrix [ to_idx ( source_id)][ to_idx ( vertex_id)] != invalid_id;
218+ return specialized_impl::get_edge_id (* this , source_id, vertex_id) != invalid_id;
217219 })
218220 | std::views::transform ([this , vertex_id, &edge_properties_map](const auto source_id) {
219- const auto edge_id = this -> _matrix [ to_idx ( source_id)][ to_idx ( vertex_id)] ;
221+ const auto edge_id = specialized_impl::get_edge_id (* this , source_id, vertex_id);
220222 return edge_type{
221223 edge_id, source_id, vertex_id, *edge_properties_map[to_idx (edge_id)]
222224 };
0 commit comments