Skip to content

Commit

Permalink
pasted sample code for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ShisatoYano committed Aug 24, 2024
1 parent cda37b6 commit 2081e17
Show file tree
Hide file tree
Showing 4 changed files with 440 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/components/course/cubic_spline_course/cubic_spline.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(self, x_points, y_points):
self._calculate_coefficient_c(h)
self._calculate_coefficient_b_d(h)

def calculate_y(self, x):
def calculate_position(self, x):
if x < self.x_points[0]: return None
elif x > self.x_points[-1]: return None

Expand Down
5 changes: 4 additions & 1 deletion src/components/course/cubic_spline_course/cubic_spline_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ def __init__(self, x_points, y_points):
self.sy = CubicSpline(self.s, y_points)

def calc_interpolated_xy(self, s):
pass
interpolated_x = self.sx.calculate_position(s)
interpolated_y = self.sy.calculate_position(s)

return interpolated_x, interpolated_y

def _calc_base_points(self, x_points, y_points):
dx = np.diff(x_points)
Expand Down
Loading

0 comments on commit 2081e17

Please sign in to comment.