Beispiel #1
0
 def test_point_distance(self):
     point1 = Point(2, -3)
     point2 = Point(5, 1)
     self.assertEqual(point1.get_distance_to(point2), 5)
 def calculate_edge_cost(self, node: Node, new_bifurcation: Point) -> float:
     length: float = new_bifurcation.get_distance_to(node.point)
     alpha_adjusted_weight: float = (node.weight**self.alpha)
     return length * alpha_adjusted_weight