Closed pnevyk closed 1 month ago
Provide default implementations for counts and bounds in respective traits (VerticesBase, EdgesBase, VerticesBaseWeak, EdgesBaseWeak).
VerticesBase
EdgesBase
VerticesBaseWeak
EdgesBaseWeak
vertex_count
edge_count
self.vertex_indices()
self.edge_indices()
vertex_bound
edge_bound
vertex_count_weak
vertex_bounds_weak
edge_count_weak
edge_bounds_weak
None
In all cases, keep the current (efficient) implementation.
Resolved as part of https://github.com/pnevyk/gryf/pull/78
Provide default implementations for counts and bounds in respective traits (
VerticesBase
,EdgesBase
,VerticesBaseWeak
,EdgesBaseWeak
).vertex_count
andedge_count
can be implemented by counting items inself.vertex_indices()
andself.edge_indices()
iterators, respectively.vertex_bound
andedge_bound
can be implemented by finding maximum inself.vertex_indices()
andself.edge_indices()
iterators, respectively.vertex_count_weak
,vertex_bounds_weak
,edge_count_weak
andedge_bounds_weak
can returnNone
In all cases, keep the current (efficient) implementation.