phylogenie 2.1.14__py3-none-any.whl → 2.1.15__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.
Potentially problematic release.
This version of phylogenie might be problematic. Click here for more details.
- phylogenie/tree.py +8 -0
- {phylogenie-2.1.14.dist-info → phylogenie-2.1.15.dist-info}/METADATA +1 -1
- {phylogenie-2.1.14.dist-info → phylogenie-2.1.15.dist-info}/RECORD +6 -6
- {phylogenie-2.1.14.dist-info → phylogenie-2.1.15.dist-info}/LICENSE.txt +0 -0
- {phylogenie-2.1.14.dist-info → phylogenie-2.1.15.dist-info}/WHEEL +0 -0
- {phylogenie-2.1.14.dist-info → phylogenie-2.1.15.dist-info}/entry_points.txt +0 -0
phylogenie/tree.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from collections import deque
|
|
1
2
|
from collections.abc import Iterator
|
|
2
3
|
from typing import Any
|
|
3
4
|
|
|
@@ -102,6 +103,13 @@ class Tree:
|
|
|
102
103
|
yield from child.postorder_traversal()
|
|
103
104
|
yield self
|
|
104
105
|
|
|
106
|
+
def breadth_first_traversal(self) -> Iterator["Tree"]:
|
|
107
|
+
queue: deque["Tree"] = deque([self])
|
|
108
|
+
while queue:
|
|
109
|
+
node = queue.popleft()
|
|
110
|
+
yield node
|
|
111
|
+
queue.extend(node.children)
|
|
112
|
+
|
|
105
113
|
def get_node(self, name: str) -> "Tree":
|
|
106
114
|
for node in self:
|
|
107
115
|
if node.name == name:
|
|
@@ -16,7 +16,7 @@ phylogenie/skyline/__init__.py,sha256=7pF4CUb4ZCLzNYJNhOjpuTOLTRhlK7L6ugfccNqjIG
|
|
|
16
16
|
phylogenie/skyline/matrix.py,sha256=Gl8OgKjtieG0NwPYiPimKI36gefV8fm_OeorjdXxPTs,9146
|
|
17
17
|
phylogenie/skyline/parameter.py,sha256=EM9qlPt0JhMBy3TbztM0dj24BaGNEy8KWKdTObDKhbI,4644
|
|
18
18
|
phylogenie/skyline/vector.py,sha256=bJP7_FNX_Klt6wXqsyfj0KX3VNj6-dIhzCKSJuQcOV0,7115
|
|
19
|
-
phylogenie/tree.py,sha256=
|
|
19
|
+
phylogenie/tree.py,sha256=EL2bn40AafxQfpA3NP7ohAVA5EoQ87d2JhtulPOyZqg,4413
|
|
20
20
|
phylogenie/treesimulator/__init__.py,sha256=yqS2vtYMhdWSXc9RAnX1dd4zAqSQweMLyVKTnJLfGTU,1106
|
|
21
21
|
phylogenie/treesimulator/events/__init__.py,sha256=6zSgZ0MEUMvTK4yPlSolJnRWzCARLS-jYreTzh45mQo,1033
|
|
22
22
|
phylogenie/treesimulator/events/contact_tracing.py,sha256=_nJ85yhgGkeruQgMHvGpDYoyhheBf8M4LgZWiWdi5dY,4801
|
|
@@ -28,8 +28,8 @@ phylogenie/treesimulator/model.py,sha256=Nyg6R8XmMwZMSw1-dII81sU9uU7tDe-NMs8v1qK
|
|
|
28
28
|
phylogenie/typeguards.py,sha256=JtqmbEWJZBRHbWgCvcl6nrWm3VcBfzRbklbTBYHItn0,1325
|
|
29
29
|
phylogenie/typings.py,sha256=GknvAFXyiaWeeYJ8Lk5d6E2VHT-xW6ONEojYbtJYiB8,476
|
|
30
30
|
phylogenie/utils.py,sha256=l7kJ0mkdhplz_hTUseBxaGpEKngsWUOSiCMyLMIWYZQ,1936
|
|
31
|
-
phylogenie-2.1.
|
|
32
|
-
phylogenie-2.1.
|
|
33
|
-
phylogenie-2.1.
|
|
34
|
-
phylogenie-2.1.
|
|
35
|
-
phylogenie-2.1.
|
|
31
|
+
phylogenie-2.1.15.dist-info/LICENSE.txt,sha256=NUrDqElK-eD3I0WqC004CJsy6cs0JgsAoebDv_42-pw,1071
|
|
32
|
+
phylogenie-2.1.15.dist-info/METADATA,sha256=Yrjt2kSAxD3Wx87slr4iu59T7XCHbIhg5JORHsxTxZg,5477
|
|
33
|
+
phylogenie-2.1.15.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
34
|
+
phylogenie-2.1.15.dist-info/entry_points.txt,sha256=Rt6_usN0FkBX1ZfiqCirjMN9FKOgFLG8rydcQ8kugeE,51
|
|
35
|
+
phylogenie-2.1.15.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|