@@ -107,17 +107,17 @@ class adjacency_matrix final {
107107 }
108108
109109 [[nodiscard]] gl_attr_force_inline bool has_edge (id_type source_id, id_type target_id) const {
110- return specialized_impl::get_edge_id (*this , source_id, target_id) != invalid_id;
110+ return specialized_impl::get_entry (*this , source_id, target_id) != invalid_id;
111111 }
112112
113113 [[nodiscard]] bool has_edge (const edge_type& edge) const {
114- return specialized_impl::get_edge_id (*this , edge.source (), edge.target ()) == edge.id ();
114+ return specialized_impl::get_entry (*this , edge.source (), edge.target ()) == edge.id ();
115115 }
116116
117117 [[nodiscard]] std::optional<edge_type> get_edge (id_type source_id, id_type target_id) const
118118 requires(traits::c_has_empty_properties<edge_type>)
119119 {
120- const auto edge_id = specialized_impl::get_edge_id (*this , source_id, target_id);
120+ const auto edge_id = specialized_impl::get_entry (*this , source_id, target_id);
121121 if (edge_id == invalid_id)
122122 return std::nullopt ;
123123 return std::make_optional<edge_type>(edge_id, source_id, target_id);
@@ -128,7 +128,7 @@ class adjacency_matrix final {
128128 ) const
129129 requires(traits::c_has_non_empty_properties<edge_type>)
130130 {
131- const auto edge_id = specialized_impl::get_edge_id (*this , source_id, target_id);
131+ const auto edge_id = specialized_impl::get_entry (*this , source_id, target_id);
132132 if (edge_id == invalid_id)
133133 return std::nullopt ;
134134 return std::make_optional<edge_type>(
@@ -139,7 +139,7 @@ class adjacency_matrix final {
139139 [[nodiscard]] std::vector<edge_type> get_edges (id_type source_id, id_type target_id) const
140140 requires(traits::c_has_empty_properties<edge_type>)
141141 {
142- const auto edge_id = specialized_impl::get_edge_id (*this , source_id, target_id);
142+ const auto edge_id = specialized_impl::get_entry (*this , source_id, target_id);
143143 if (edge_id == invalid_id)
144144 return std::vector<edge_type>();
145145 return std::vector<edge_type>{
@@ -152,7 +152,7 @@ class adjacency_matrix final {
152152 ) const
153153 requires(traits::c_has_non_empty_properties<edge_type>)
154154 {
155- const auto edge_id = specialized_impl::get_edge_id (*this , source_id, target_id);
155+ const auto edge_id = specialized_impl::get_entry (*this , source_id, target_id);
156156 if (edge_id == invalid_id)
157157 return std::vector<edge_type>();
158158 return std::vector<edge_type>{
@@ -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_entry (* 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_entry (*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_entry (* 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_entry (* 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