Skip to content

Commit

Permalink
defined class and constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
ShisatoYano committed Aug 19, 2024
1 parent 1ab43c0 commit 764dfe7
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/components/course/cubic_spline_course/cubic_spline_2d.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"""
cubic_spline_2d.py
Author: Shisato Yano
"""

import numpy as np

from cubic_spline import CubicSpline


class CubicSpline2D:
"""
2D Cubic Spline class
Each section between two points are approximated as the following equation
y_i = a_i + b_i * (x - x_i) + c_i * (x - x_i)^2 + d_i * (x - x_i)^3
"""

def __init__(self, x_points, y_points):
print(x_points)
print(y_points)

0 comments on commit 764dfe7

Please sign in to comment.