Skip to content

Commit

Permalink
v3.4.1 rc
Browse files Browse the repository at this point in the history
  • Loading branch information
HeWeMel committed Dec 26, 2024
1 parent e05c744 commit 8f3fd22
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions src/nographs/_gears.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 8f3fd22

Please sign in to comment.