dtools.datastructures 0.25.0__py3-none-any.whl → 0.25.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dtools/datastructures/__init__.py +3 -2
- dtools/datastructures/nodes.py +6 -1
- dtools/datastructures/queues.py +12 -7
- dtools/datastructures/splitends/__init__.py +3 -2
- dtools/datastructures/splitends/se.py +4 -1
- dtools/datastructures/tuples.py +7 -1
- {dtools_datastructures-0.25.0.dist-info → dtools_datastructures-0.25.1.dist-info}/METADATA +8 -4
- dtools_datastructures-0.25.1.dist-info/RECORD +12 -0
- dtools_datastructures-0.25.0.dist-info/RECORD +0 -12
- {dtools_datastructures-0.25.0.dist-info → dtools_datastructures-0.25.1.dist-info}/LICENSE +0 -0
- {dtools_datastructures-0.25.0.dist-info → dtools_datastructures-0.25.1.dist-info}/WHEEL +0 -0
@@ -25,7 +25,8 @@ Designed to be helpful when using and implementation algorithms.
|
|
25
25
|
* module dtools.datastructures.queues: queue data structures
|
26
26
|
|
27
27
|
"""
|
28
|
-
__version__ = "0.25.
|
28
|
+
__version__ = "0.25.1"
|
29
29
|
__author__ = "Geoffrey R. Scheller"
|
30
|
-
__copyright__ = "Copyright (c) 2023-
|
30
|
+
__copyright__ = "Copyright (c) 2023-2025 Geoffrey R. Scheller"
|
31
31
|
__license__ = "Apache License 2.0"
|
32
|
+
|
dtools/datastructures/nodes.py
CHANGED
@@ -27,11 +27,15 @@ other data structures which contain these data structures.
|
|
27
27
|
"""
|
28
28
|
from __future__ import annotations
|
29
29
|
from collections.abc import Callable, Iterator
|
30
|
-
from typing import Callable, cast, Iterator
|
30
|
+
from typing import Callable, cast, Iterator, TypeVar
|
31
31
|
from dtools.fp.err_handling import MB
|
32
32
|
|
33
33
|
__all__ = ['SL_Node', 'DL_Node', 'Tree_Node']
|
34
34
|
|
35
|
+
D = TypeVar('D')
|
36
|
+
M = TypeVar('M')
|
37
|
+
T = TypeVar('T')
|
38
|
+
|
35
39
|
class SL_Node[D]():
|
36
40
|
"""Data node for rearward Pointing (tip-to-root) singularly linked graphs.
|
37
41
|
|
@@ -187,3 +191,4 @@ class Tree_Node[D, M]():
|
|
187
191
|
|
188
192
|
def is_top(self) -> bool:
|
189
193
|
return self._up == MB()
|
194
|
+
|
dtools/datastructures/queues.py
CHANGED
@@ -21,34 +21,39 @@
|
|
21
21
|
|
22
22
|
#### FIFOQueue
|
23
23
|
|
24
|
-
* class
|
25
|
-
* function
|
24
|
+
* class FIFOQueue: First-In-First-Out Queue
|
25
|
+
* function FQ: Constructs a FIFOQueue from a variable number of arguments
|
26
26
|
|
27
27
|
---
|
28
28
|
|
29
29
|
#### LIFOQueue
|
30
30
|
|
31
|
-
* class
|
32
|
-
* function
|
31
|
+
* class LIFOQueue: Last-In-First-Out Queue
|
32
|
+
* function LQ: Constructs a LIFOQueue from a variable number of arguments
|
33
33
|
|
34
34
|
---
|
35
35
|
|
36
36
|
#### DoubleQueue
|
37
37
|
|
38
|
-
* class
|
39
|
-
* function
|
38
|
+
* class DoubleQueue: Double-Ended Queue
|
39
|
+
* function DQ: Constructs a DoubleQueue from a variable number of arguments
|
40
40
|
|
41
41
|
"""
|
42
42
|
from __future__ import annotations
|
43
43
|
|
44
44
|
from collections.abc import Callable, Iterable, Iterator, Sequence
|
45
|
-
from typing import Never, overload
|
45
|
+
from typing import Never, overload, TypeVar
|
46
46
|
from dtools.circular_array.ca import ca, CA
|
47
47
|
from dtools.fp.err_handling import MB
|
48
48
|
|
49
49
|
__all__ = [ 'DoubleQueue', 'FIFOQueue', 'LIFOQueue', 'QueueBase',
|
50
50
|
'DQ', 'FQ', 'LQ' ]
|
51
51
|
|
52
|
+
D = TypeVar('D')
|
53
|
+
L = TypeVar('L')
|
54
|
+
R = TypeVar('R')
|
55
|
+
U = TypeVar('U')
|
56
|
+
|
52
57
|
class QueueBase[D](Sequence[D]):
|
53
58
|
"""Base class for circular area based queues.
|
54
59
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2024-2025 Geoffrey R. Scheller
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -23,5 +23,6 @@ Singularly linked datastructures that can safely share data between themselves.
|
|
23
23
|
|
24
24
|
"""
|
25
25
|
__author__ = "Geoffrey R. Scheller"
|
26
|
-
__copyright__ = "Copyright (c) 2024 Geoffrey R. Scheller"
|
26
|
+
__copyright__ = "Copyright (c) 2024-2025 Geoffrey R. Scheller"
|
27
27
|
__license__ = "Apache License 2.0"
|
28
|
+
|
@@ -27,12 +27,15 @@ subpackage.
|
|
27
27
|
from __future__ import annotations
|
28
28
|
|
29
29
|
from collections.abc import Callable, Iterable, Iterator
|
30
|
-
from typing import cast, Never
|
30
|
+
from typing import cast, Never, TypeVar
|
31
31
|
from ..nodes import SL_Node
|
32
32
|
from dtools.fp.err_handling import MB
|
33
33
|
|
34
34
|
__all__ = [ 'SplitEnd', 'SE' ]
|
35
35
|
|
36
|
+
D = TypeVar('D')
|
37
|
+
T = TypeVar('T')
|
38
|
+
|
36
39
|
class SplitEnd[D]():
|
37
40
|
"""Class SplitEnd
|
38
41
|
|
dtools/datastructures/tuples.py
CHANGED
@@ -31,11 +31,17 @@ sentinel values.
|
|
31
31
|
from __future__ import annotations
|
32
32
|
|
33
33
|
from collections.abc import Callable, Iterable, Iterator, Sequence
|
34
|
-
from typing import cast, overload
|
34
|
+
from typing import cast, overload, TypeVar
|
35
35
|
from dtools.fp.iterables import FM, accumulate, concat, exhaust, merge
|
36
36
|
|
37
37
|
__all__ = ['FTuple', 'FT']
|
38
38
|
|
39
|
+
D = TypeVar('D')
|
40
|
+
E = TypeVar('E')
|
41
|
+
L = TypeVar('L')
|
42
|
+
R = TypeVar('L')
|
43
|
+
U = TypeVar('U')
|
44
|
+
|
39
45
|
class FTuple[D](Sequence[D]):
|
40
46
|
"""
|
41
47
|
#### Functional Tuple
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: dtools.datastructures
|
3
|
-
Version: 0.25.
|
3
|
+
Version: 0.25.1
|
4
4
|
Summary: ### package datastructures
|
5
5
|
Keywords: datastructures,data structures,fifo,lifo,stack,queue,SplitEnd
|
6
6
|
Author-email: "Geoffrey R. Scheller" <geoffrey@scheller.com>
|
@@ -14,14 +14,14 @@ Classifier: Operating System :: OS Independent
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.13
|
15
15
|
Classifier: Typing :: Typed
|
16
16
|
Requires-Dist: dtools.circular-array >= 3.9.0, < 3.10
|
17
|
-
Requires-Dist: dtools.fp >= 1.
|
17
|
+
Requires-Dist: dtools.fp >= 1.4.0, < 1.5
|
18
18
|
Requires-Dist: pytest >=8.3.2 ; extra == "test"
|
19
19
|
Project-URL: Changelog, https://github.com/grscheller/dtools-datastructures/blob/main/CHANGELOG.md
|
20
20
|
Project-URL: Documentation, https://grscheller.github.io/dtools-docs/datastructures
|
21
21
|
Project-URL: Source, https://github.com/grscheller/dtools-datastructures
|
22
22
|
Provides-Extra: test
|
23
23
|
|
24
|
-
#
|
24
|
+
# Developer Tools - Datastructures Useful for Algorithms
|
25
25
|
|
26
26
|
Python package of data structures which support the use and
|
27
27
|
implementation of algorithms.
|
@@ -32,6 +32,8 @@ implementation of algorithms.
|
|
32
32
|
* **Detailed documentation**
|
33
33
|
* [Detailed API documentation][3] on *GH-Pages*
|
34
34
|
|
35
|
+
This project is part of the
|
36
|
+
[Developer Tools for Python][4] **dtools.** namespace project.
|
35
37
|
|
36
38
|
### Overview
|
37
39
|
|
@@ -59,7 +61,9 @@ yourself.
|
|
59
61
|
|
60
62
|
---
|
61
63
|
|
62
|
-
[1]: https://pypi.org/project/
|
64
|
+
[1]: https://pypi.org/project/dtools.datastructures/
|
63
65
|
[2]: https://github.com/grscheller/dtools-datastructures/
|
64
66
|
[3]: https://grscheller.github.io/dtools-docs/datastructures/
|
67
|
+
[4]: https://github.com/grscheller/dtools-docs
|
68
|
+
|
65
69
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
dtools/datastructures/__init__.py,sha256=ST-ArKsBdvwM8l48BLTBGr-cljt6ulNw9N4QIRCC2Ck,1164
|
2
|
+
dtools/datastructures/nodes.py,sha256=kbk1rcHhicQZssDguRxybakUi450qrfrHBSrf6blM78,5757
|
3
|
+
dtools/datastructures/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
+
dtools/datastructures/queues.py,sha256=BkvGl1Opooozz46mgPNPMgXnI57yXcABAP9lwXKk8_M,12173
|
5
|
+
dtools/datastructures/tuples.py,sha256=uc1kU87rf6L9sOaBVRMKP8ZT1roACIm2pJUBaF_M5-k,6678
|
6
|
+
dtools/datastructures/splitends/__init__.py,sha256=y9zPBG_ZM_l0uDWZr4Xown72VnR3dvqlhrvTybLP09c,946
|
7
|
+
dtools/datastructures/splitends/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
+
dtools/datastructures/splitends/se.py,sha256=M0lsaLVmb_zbt8CvXXGd090FUKzuxPgWtRfLvXtls_A,5644
|
9
|
+
dtools_datastructures-0.25.1.dist-info/LICENSE,sha256=csqbZRvA3Nyuav1aszWvswE8CZtaKr-hMjjjcKqms7w,10774
|
10
|
+
dtools_datastructures-0.25.1.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
11
|
+
dtools_datastructures-0.25.1.dist-info/METADATA,sha256=pG5tlUXUTkoolVEUtSzSgH_PcZvpgU_eYwmPfcoohGg,2764
|
12
|
+
dtools_datastructures-0.25.1.dist-info/RECORD,,
|
@@ -1,12 +0,0 @@
|
|
1
|
-
dtools/datastructures/__init__.py,sha256=6GNS6Y94Af0IeRhKdQlUoPsKK1BLfpeSa_wjxXjz4uw,1163
|
2
|
-
dtools/datastructures/nodes.py,sha256=surkupETxZUAZeuhf8wM8BUWbP98trmqx5fczx32IU4,5695
|
3
|
-
dtools/datastructures/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
-
dtools/datastructures/queues.py,sha256=30rBRKZRCwYLLog2SIFLxqb5RzMvTfxroZK_K2FOfoM,12119
|
5
|
-
dtools/datastructures/tuples.py,sha256=88-e9Dpoeku8sYa3cmDFX17D80LiIb7lFHC2CGa6OnU,6583
|
6
|
-
dtools/datastructures/splitends/__init__.py,sha256=y0BpPKBg6g9GtcHwhEhQTwnAIdpxvhVD09vE1AMPYPM,940
|
7
|
-
dtools/datastructures/splitends/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
-
dtools/datastructures/splitends/se.py,sha256=Anm7fWa9A0hB6v6I3SVg-ZMm47J5LblAyyOV5gMnli8,5600
|
9
|
-
dtools_datastructures-0.25.0.dist-info/LICENSE,sha256=csqbZRvA3Nyuav1aszWvswE8CZtaKr-hMjjjcKqms7w,10774
|
10
|
-
dtools_datastructures-0.25.0.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
11
|
-
dtools_datastructures-0.25.0.dist-info/METADATA,sha256=reT_ouL-PHBhasetsZDmhTrjrwqp6aXAvhMe2PA18f4,2625
|
12
|
-
dtools_datastructures-0.25.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|