natural-agi-common 0.1.34__tar.gz → 0.1.36__tar.gz
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.
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/PKG-INFO +1 -1
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/traversal/visitors/angle_visitor.py +10 -4
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/natural_agi_common.egg-info/PKG-INFO +1 -1
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/setup.py +1 -1
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/README.md +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/__init__.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/critical_graph_utils.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/critical_point.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/decorator.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/graph_utils.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/model/__init__.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/model/dlq.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/model/enums.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/model/half_plane.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/model/length_comparison_result.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/model/point.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/model/vector.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/params.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/traversal/__init__.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/traversal/graph_traversal.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/traversal/start_point_selector.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/traversal/visitors/__init__.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/traversal/visitors/direction_visitor.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/traversal/visitors/length_comparison_visitor.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/traversal/visitors/quadrant_visitor.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/traversal/visitors/visitor.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/traversal/visitors/visitor_result_persistence_service.py +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/natural_agi_common.egg-info/SOURCES.txt +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/natural_agi_common.egg-info/dependency_links.txt +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/natural_agi_common.egg-info/requires.txt +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/natural_agi_common.egg-info/top_level.txt +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/pyproject.toml +0 -0
- {natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/setup.cfg +0 -0
{natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/traversal/visitors/angle_visitor.py
RENAMED
|
@@ -29,8 +29,8 @@ class AngleVisitor(Visitor):
|
|
|
29
29
|
return {"angles": angles, "point_id": point.id}
|
|
30
30
|
return None
|
|
31
31
|
|
|
32
|
-
def visit_line(self, line: Vector) -> Dict[str, Any]:
|
|
33
|
-
angle_with_ox = self._calculate_angle_with_ox(line)
|
|
32
|
+
def visit_line(self, line: Vector, start_point: Point) -> Dict[str, Any]:
|
|
33
|
+
angle_with_ox = self._calculate_angle_with_ox(line, start_point)
|
|
34
34
|
self.line_angles[line.id] = angle_with_ox
|
|
35
35
|
self.graph.nodes[line.id]["angle_with_ox"] = angle_with_ox
|
|
36
36
|
return {"angle_with_ox": angle_with_ox, "line_id": line.id}
|
|
@@ -159,8 +159,14 @@ class AngleVisitor(Visitor):
|
|
|
159
159
|
angle2 = round(angle2 / 10) * 10
|
|
160
160
|
return [angle1, angle2]
|
|
161
161
|
|
|
162
|
-
def _calculate_angle_with_ox(self, line: Vector) -> float:
|
|
163
|
-
|
|
162
|
+
def _calculate_angle_with_ox(self, line: Vector, start_point: Point) -> float:
|
|
163
|
+
start_coords = (start_point.x, start_point.y)
|
|
164
|
+
end_coords = (
|
|
165
|
+
(line.x2, line.y2)
|
|
166
|
+
if line.x1 == start_point.x and line.y1 == start_point.y
|
|
167
|
+
else (line.x1, line.y1)
|
|
168
|
+
)
|
|
169
|
+
vector = (end_coords[0] - start_coords[0], end_coords[1] - start_coords[1])
|
|
164
170
|
dot_product = vector[0] * 1 + vector[1] * 0
|
|
165
171
|
magnitude = math.sqrt(vector[0] ** 2 + vector[1] ** 2)
|
|
166
172
|
cos_angle = dot_product / magnitude
|
|
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
|
{natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/model/length_comparison_result.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/traversal/start_point_selector.py
RENAMED
|
File without changes
|
{natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/traversal/visitors/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/common/traversal/visitors/visitor.py
RENAMED
|
File without changes
|
|
File without changes
|
{natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/natural_agi_common.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/natural_agi_common.egg-info/requires.txt
RENAMED
|
File without changes
|
{natural_agi_common-0.1.34 → natural_agi_common-0.1.36}/natural_agi_common.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|