RDG-Networks 0.2.0__tar.gz → 0.2.2__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {RDG-Networks-0.2.0 → RDG-Networks-0.2.2}/PKG-INFO +1 -1
- {RDG-Networks-0.2.0 → RDG-Networks-0.2.2}/RDG_Networks.egg-info/PKG-INFO +1 -1
- {RDG-Networks-0.2.0 → RDG-Networks-0.2.2}/RDG_networks/generate_line_segments_dynamic.py +6 -2
- {RDG-Networks-0.2.0 → RDG-Networks-0.2.2}/setup.py +1 -1
- {RDG-Networks-0.2.0 → RDG-Networks-0.2.2}/LICENSE.txt +0 -0
- {RDG-Networks-0.2.0 → RDG-Networks-0.2.2}/RDG_Networks.egg-info/SOURCES.txt +0 -0
- {RDG-Networks-0.2.0 → RDG-Networks-0.2.2}/RDG_Networks.egg-info/dependency_links.txt +0 -0
- {RDG-Networks-0.2.0 → RDG-Networks-0.2.2}/RDG_Networks.egg-info/entry_points.txt +0 -0
- {RDG-Networks-0.2.0 → RDG-Networks-0.2.2}/RDG_Networks.egg-info/requires.txt +0 -0
- {RDG-Networks-0.2.0 → RDG-Networks-0.2.2}/RDG_Networks.egg-info/top_level.txt +0 -0
- {RDG-Networks-0.2.0 → RDG-Networks-0.2.2}/RDG_networks/Classes.py +0 -0
- {RDG-Networks-0.2.0 → RDG-Networks-0.2.2}/RDG_networks/__init__.py +0 -0
- {RDG-Networks-0.2.0 → RDG-Networks-0.2.2}/RDG_networks/draw_segments.py +0 -0
- {RDG-Networks-0.2.0 → RDG-Networks-0.2.2}/RDG_networks/generate_line_network.py +0 -0
- {RDG-Networks-0.2.0 → RDG-Networks-0.2.2}/RDG_networks/generate_line_segments.py +0 -0
- {RDG-Networks-0.2.0 → RDG-Networks-0.2.2}/RDG_networks/get_intersection_segments.py +0 -0
- {RDG-Networks-0.2.0 → RDG-Networks-0.2.2}/RDG_networks/sample_in_polygon.py +0 -0
- {RDG-Networks-0.2.0 → RDG-Networks-0.2.2}/README.md +0 -0
- {RDG-Networks-0.2.0 → RDG-Networks-0.2.2}/setup.cfg +0 -0
@@ -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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|