RDG-Networks 0.2.0__py3-none-any.whl → 0.2.2__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.
- {RDG_Networks-0.2.0.dist-info → RDG_Networks-0.2.2.dist-info}/METADATA +1 -1
- {RDG_Networks-0.2.0.dist-info → RDG_Networks-0.2.2.dist-info}/RECORD +7 -7
- RDG_networks/generate_line_segments_dynamic.py +6 -2
- {RDG_Networks-0.2.0.dist-info → RDG_Networks-0.2.2.dist-info}/LICENSE.txt +0 -0
- {RDG_Networks-0.2.0.dist-info → RDG_Networks-0.2.2.dist-info}/WHEEL +0 -0
- {RDG_Networks-0.2.0.dist-info → RDG_Networks-0.2.2.dist-info}/entry_points.txt +0 -0
- {RDG_Networks-0.2.0.dist-info → RDG_Networks-0.2.2.dist-info}/top_level.txt +0 -0
@@ -3,12 +3,12 @@ RDG_networks/__init__.py,sha256=aCfGs87cJn0Tp5GqTpFXPOEfJPpR4Tnnz819Kk_0t84,661
|
|
3
3
|
RDG_networks/draw_segments.py,sha256=U53N5GXmQHWKdM1Q1faP_EGKjc6enOu2mcsunzSFpP0,984
|
4
4
|
RDG_networks/generate_line_network.py,sha256=lJ4rhObim3WcEQoebomewRQKWNJC5phFyFYRW7qjXIg,1127
|
5
5
|
RDG_networks/generate_line_segments.py,sha256=QV8_k7q6TD5c7Hcb2Ms_apEdWYw4XdLr7rdJgh49v4Q,9004
|
6
|
-
RDG_networks/generate_line_segments_dynamic.py,sha256=
|
6
|
+
RDG_networks/generate_line_segments_dynamic.py,sha256=hAdqjyNgkEUnm7CprSKeEu7yCbvFBY2OHnkB_smubuA,7438
|
7
7
|
RDG_networks/get_intersection_segments.py,sha256=mXB5qCy1oOps4Vu1mX6flW6v_4Xxc71YK41yOWjJX8o,2797
|
8
8
|
RDG_networks/sample_in_polygon.py,sha256=qpPpW-Da1vK8ZkVWMJ0zBsE8IgyMB619gCdybSkzKSQ,1605
|
9
|
-
RDG_Networks-0.2.
|
10
|
-
RDG_Networks-0.2.
|
11
|
-
RDG_Networks-0.2.
|
12
|
-
RDG_Networks-0.2.
|
13
|
-
RDG_Networks-0.2.
|
14
|
-
RDG_Networks-0.2.
|
9
|
+
RDG_Networks-0.2.2.dist-info/LICENSE.txt,sha256=Zlv8517YKFuHaaqksoTKeIiQBl9DGxhUdb_0kJg0NOE,1066
|
10
|
+
RDG_Networks-0.2.2.dist-info/METADATA,sha256=cJqaiNH3FiaBCJ-J55--qd2h_rDry9Vxq-aj1N2576E,1896
|
11
|
+
RDG_Networks-0.2.2.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
|
12
|
+
RDG_Networks-0.2.2.dist-info/entry_points.txt,sha256=Htsh9jRabMCGHwXayUwZoSy-9IFGFrMB1X9hgyyr3_8,350
|
13
|
+
RDG_Networks-0.2.2.dist-info/top_level.txt,sha256=4gUUYafD5Al9V8ZSiViVGYHpRMMCsCBcGgCNodk9Syg,13
|
14
|
+
RDG_Networks-0.2.2.dist-info/RECORD,,
|
@@ -104,6 +104,9 @@ def check_and_update_when_intersect(lines: List[Dict[str, Any]], epsilon: float)
|
|
104
104
|
if j1['id'][:-2] == j2['id'][:-2] or index2 < index1:
|
105
105
|
continue
|
106
106
|
|
107
|
+
if j1['growth_status'] == False and j2['growth_status'] == False:
|
108
|
+
continue
|
109
|
+
|
107
110
|
line1 = LineString([j1['start'], j1['end']])
|
108
111
|
line2 = LineString([j2['start'], j2['end']])
|
109
112
|
|
@@ -154,7 +157,7 @@ def transform_to_standard_lines(lines: List[Dict[str, Any]]) -> List[LineSegment
|
|
154
157
|
|
155
158
|
return segments
|
156
159
|
|
157
|
-
def generate_line_segments_dynamic(size: int, dt: float, epsilon: float, time: float) -> List[LineSegment]:
|
160
|
+
def generate_line_segments_dynamic(size: int, dt: float, epsilon: float, time: float, angles='uniform') -> List[LineSegment]:
|
158
161
|
"""
|
159
162
|
Generate line segments dynamically based on growth and intersection conditions.
|
160
163
|
|
@@ -163,6 +166,7 @@ def generate_line_segments_dynamic(size: int, dt: float, epsilon: float, time: f
|
|
163
166
|
dt (float): Time increment.
|
164
167
|
epsilon (float): Growth rate of the lines.
|
165
168
|
time (float): Interval at which new lines are added.
|
169
|
+
angles (str or List): The allowed angles in the system (default is 'uniform' for random angles).
|
166
170
|
|
167
171
|
Returns:
|
168
172
|
List[LineSegment]: A list of LineSegment objects representing standard line segments.
|
@@ -183,7 +187,7 @@ def generate_line_segments_dynamic(size: int, dt: float, epsilon: float, time: f
|
|
183
187
|
else:
|
184
188
|
number_of_lines_to_add = int(t - (t % time))
|
185
189
|
for _ in range(number_of_lines_to_add):
|
186
|
-
lines = add_new_line(lines, line_id, t_total)
|
190
|
+
lines = add_new_line(lines, line_id, t_total, angles=angles)
|
187
191
|
line_id += 1
|
188
192
|
|
189
193
|
t = 0
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|