Skip to content

Commit 9439fd6

Browse files
committed
removed get_
1 parent 6a68a00 commit 9439fd6

3 files changed

Lines changed: 84 additions & 97 deletions

File tree

include/hgl/hypergraph.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class hypergraph final {
143143
return std::views::iota(initial_id_v<id_type>, this->_n_vertices);
144144
}
145145

146-
[[nodiscard]] vertex_type get_vertex(const id_type vertex_id) const {
146+
[[nodiscard]] vertex_type vertex(const id_type vertex_id) const {
147147
this->_verify_vertex_id(vertex_id);
148148
if constexpr (traits::c_non_empty_properties<vertex_properties_type>)
149149
return vertex_type{vertex_id, *this->_vertex_properties[vertex_id]};
@@ -251,7 +251,7 @@ class hypergraph final {
251251
return util::deref_view(this->_vertex_properties);
252252
}
253253

254-
[[nodiscard]] gl_attr_force_inline vertex_properties_type& get_vertex_properties(
254+
[[nodiscard]] gl_attr_force_inline vertex_properties_type& vertex_properties(
255255
const id_type vertex_id
256256
) const
257257
requires(traits::c_non_empty_properties<vertex_properties_type>)
@@ -270,7 +270,7 @@ class hypergraph final {
270270
return std::views::iota(initial_id_v<id_type>, this->_n_hyperedges);
271271
}
272272

273-
[[nodiscard]] hyperedge_type get_hyperedge(const id_type hyperedge_id) const {
273+
[[nodiscard]] hyperedge_type hyperedge(const id_type hyperedge_id) const {
274274
this->_verify_hyperedge_id(hyperedge_id);
275275
if constexpr (traits::c_non_empty_properties<hyperedge_properties_type>)
276276
return hyperedge_type{hyperedge_id, *this->_hyperedge_properties[hyperedge_id]};
@@ -538,7 +538,7 @@ class hypergraph final {
538538
return util::deref_view(this->_hyperedge_properties);
539539
}
540540

541-
[[nodiscard]] gl_attr_force_inline hyperedge_properties_type& get_hyperedge_properties(
541+
[[nodiscard]] gl_attr_force_inline hyperedge_properties_type& hyperedge_properties(
542542
const id_type id
543543
) const
544544
requires(traits::c_non_empty_properties<hyperedge_properties_type>)

tests/source/hgl/test_conversion.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ struct test_hypergraph_conversion {
4949
typename std::decay_t<decltype(h)>::vertex_properties_type,
5050
property_type>)
5151
for (const auto& vid : h.vertex_ids())
52-
h.get_vertex_properties(vid) = property_type("vertex_" + std::to_string(vid));
52+
h.vertex_properties(vid) = property_type("vertex_" + std::to_string(vid));
5353

5454
if constexpr (std::same_as<
5555
typename std::decay_t<decltype(h)>::hyperedge_properties_type,
5656
property_type>)
5757
for (const auto& eid : h.hyperedge_ids())
58-
h.get_hyperedge_properties(eid) = property_type("hyperedge_" + std::to_string(eid));
58+
h.hyperedge_properties(eid) = property_type("hyperedge_" + std::to_string(eid));
5959
}
6060

6161
void validate_hypergraph(const hgl::traits::c_undirected_hypergraph auto& h) {
@@ -103,13 +103,13 @@ struct test_hypergraph_conversion {
103103
typename std::decay_t<decltype(h)>::vertex_properties_type,
104104
property_type>)
105105
for (const auto& vid : h.vertex_ids())
106-
CHECK_EQ(h.get_vertex_properties(vid), "vertex_" + std::to_string(vid));
106+
CHECK_EQ(h.vertex_properties(vid), "vertex_" + std::to_string(vid));
107107

108108
if constexpr (std::same_as<
109109
typename std::decay_t<decltype(h)>::hyperedge_properties_type,
110110
property_type>)
111111
for (const auto& eid : h.hyperedge_ids())
112-
CHECK_EQ(h.get_hyperedge_properties(eid), "hyperedge_" + std::to_string(eid));
112+
CHECK_EQ(h.hyperedge_properties(eid), "hyperedge_" + std::to_string(eid));
113113
}
114114
};
115115

0 commit comments

Comments
 (0)