Beispiel #1
0
def calc_deriv_bspline(order, knots, index, x):
    """ compute derivative value of B-Spline function at x
    order(Int) : B-Spline order (k in paper)
    knots( [(double,Int)]) : knot location and multiplicity
    index(Int) : index of B-Spline (0 origin)
    x(double) :
    """
    ts = make_ts(knots)
    xs = np.array([x])
    ys = calc_deriv_bspline_xs(order, ts, index, xs)
    return ys[0]
Beispiel #2
0
 def one_basis(i):
     non0 = non0_q_list(order, self.knots, i)
     val = calc_bspline_xs(order, ts, i, xs)
     deriv = calc_deriv_bspline_xs(order, ts, i, xs)
     return BSpline(i, non0, val, deriv)