From 8f3fd223a2e444939135868e222ab95640a2f89a Mon Sep 17 00:00:00 2001 From: HeWeMel <69761336+HeWeMel@users.noreply.github.com> Date: Thu, 26 Dec 2024 19:27:57 +0100 Subject: [PATCH] v3.4.1 rc --- src/nographs/_gears.py | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/src/nographs/_gears.py b/src/nographs/_gears.py index ebeb6b3..c7480b9 100644 --- a/src/nographs/_gears.py +++ b/src/nographs/_gears.py @@ -210,27 +210,6 @@ def vertex_id_to_number_mapping( """ raise NotImplementedError # pragma: no cover # Not reachable - @abstractmethod - def sequence_of_edge_labels( - self, initial_content: Iterable[T_labels] - ) -> MutableSequenceOfLabels[T_labels]: - """Factory for a sequence of edge attributes.""" - raise NotImplementedError - - @abstractmethod - def vertex_id_to_number_mapping( - self, initial_content: Iterable[Tuple[T_vertex_id, int]] - ) -> VertexIdToNumberMapping[T_vertex_id]: - """Factory for a mapping from a vertex id to non-negative integers - starting at zero, that represent a numbering of some vertices. - - If the returned mapping does not contain a value for some key, - its method __getitem__ needs to return 0. - - :param initial_content: The collection is created with this initial content. - """ - raise NotImplementedError - class Gear( Generic[T_vertex, T_vertex_id, T_weight, T_labels], @@ -638,21 +617,6 @@ def vertex_id_to_number_mapping( initial_content, ) - def vertex_id_to_number_mapping( - self, initial_content: Iterable[Tuple[IntVertexID, int]] - ) -> VertexIdToNumberMapping[IntVertexID]: - # This implementation is limited to 2^32 values, meaning 2^31 vertices - # when numbering enter and leave events, thus 2.147.483.648 vertices. - return VertexMappingWrappingSequenceWithoutNone[int]( - lambda: array( - "L", - repeat(0, self._pre_allocate), - ), - 0, - 1024, - initial_content, - ) - class GearForIntVertexIDsAndIntsMaybeFloats( GearForIntVertexIDs[T_vertex, float, T_labels]