aerosandbox.modeling.splines.hermite ==================================== .. py:module:: aerosandbox.modeling.splines.hermite Attributes ---------- .. autoapisummary:: aerosandbox.modeling.splines.hermite.x Functions --------- .. autoapisummary:: aerosandbox.modeling.splines.hermite.linear_hermite_patch aerosandbox.modeling.splines.hermite.cubic_hermite_patch aerosandbox.modeling.splines.hermite.cosine_hermite_patch Module Contents --------------- .. py:function:: linear_hermite_patch(x, x_a, x_b, f_a, f_b) Computes the linear Hermite polynomial patch that passes through the given endpoints f_a and f_b. :param x: Scalar or array of values at which to evaluate the patch. :param x_a: The x-coordinate of the first endpoint. :param x_b: The x-coordinate of the second endpoint. :param f_a: The function value at the first endpoint. :param f_b: The function value at the second endpoint. :returns: The value of the patch evaluated at the input x. Returns a scalar if x is a scalar, or an array if x is an array. .. py:function:: cubic_hermite_patch(x, x_a, x_b, f_a, f_b, dfdx_a, dfdx_b, extrapolation = 'continue') Computes the cubic Hermite polynomial patch that passes through the given endpoints and endpoint derivatives. :param x: Scalar or array of values at which to evaluate the patch. :param x_a: The x-coordinate of the first endpoint. :param x_b: The x-coordinate of the second endpoint. :param f_a: The function value at the first endpoint. :param f_b: The function value at the second endpoint. :param dfdx_a: The derivative of the function with respect to x at the first endpoint. :param dfdx_b: The derivative of the function with respect to x at the second endpoint. :param extrapolation: A string indicating how to handle extrapolation outside of the domain [x_a, x_b]. Valid values are "continue", which continues the patch beyond the endpoints, and "clip", which clips the patch at the endpoints. Default is "continue". :returns: The value of the patch evaluated at the input x. Returns a scalar if x is a scalar, or an array if x is an array. .. py:function:: cosine_hermite_patch(x, x_a, x_b, f_a, f_b, dfdx_a, dfdx_b, extrapolation = 'continue') Computes a Hermite patch (i.e., values + derivatives at endpoints) that uses a cosine function to blend between linear segments. The end result is conceptually similar to a cubic Hermite patch, but computation is faster and the patch is $C^\infty$-continuous. :param x: Scalar or array of values at which to evaluate the patch. :param x_a: The x-coordinate of the first endpoint. :param x_b: The x-coordinate of the second endpoint. :param f_a: The function value at the first endpoint. :param f_b: The function value at the second endpoint. :param dfdx_a: The derivative of the function with respect to x at the first endpoint. :param dfdx_b: The derivative of the function with respect to x at the second endpoint. :param extrapolation: A string indicating how to handle extrapolation outside of the domain [x_a, x_b]. Valid values are "continue", which continues the patch beyond the endpoints, and "linear", which extends the patch linearly at the endpoints. Default is "continue". :returns: The value of the patch evaluated at the input x. Returns a scalar if x is a scalar, or an array if x is an array. .. py:data:: x