.. index:: single: cubic_spline_interpolator
.. _cubic_spline_interpolator/0:

.. rst-class:: right

**object**

``cubic_spline_interpolator``
=============================

Natural and clamped cubic-spline interpolation using a tridiagonal solve.

| **Availability:** 
|    ``logtalk_load(numerical_analysis(loader))``

| **Author:** Paulo Moura
| **Version:** 1:0:0
| **Date:** 2026-09-04

| **Compilation flags:**
|    ``static, context_switching_calls``


| **Imports:**
|    ``public`` :ref:`interpolator <interpolator/0>`
|    ``public`` :ref:`options <options/0>`
| **Uses:**
|    :ref:`list <list/0>`

| **Remarks:**
|    (none)

| **Inherited public predicates:**
|     :ref:`options_protocol/0::check_option/1`  :ref:`options_protocol/0::check_options/1`  :ref:`options_protocol/0::default_option/1`  :ref:`options_protocol/0::default_options/1`  :ref:`interpolator_protocol/0::evaluate/3`  :ref:`interpolator_protocol/0::fit/2`  :ref:`interpolator_protocol/0::fit/3`  :ref:`options_protocol/0::option/2`  :ref:`options_protocol/0::option/3`  :ref:`options_protocol/0::valid_option/1`  :ref:`options_protocol/0::valid_options/1`  

.. contents::
   :local:
   :backlinks: top

Public predicates
-----------------

.. index:: derivative/4
.. _cubic_spline_interpolator/0::derivative/4:

``derivative/4``
^^^^^^^^^^^^^^^^

Evaluates the first or second derivative of a fitted cubic spline.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``derivative(Model,Argument,Order,Value)``
| **Mode and number of proofs:**
|    ``derivative(+compound,+number,+integer,-number)`` - ``one_or_error``

| **Exceptions:**
|    ``Order`` is not one or two:
|        ``domain_error(derivative_order,Order)``


------------

Protected predicates
--------------------

(no local declarations; see entity ancestors if any)

Private predicates
------------------

(no local declarations; see entity ancestors if any)

Operators
---------

(none)

.. seealso::

   :ref:`interpolator_protocol <interpolator_protocol/0>`, :ref:`piecewise_linear_interpolator <piecewise_linear_interpolator/0>`, :ref:`barycentric_interpolator <barycentric_interpolator/0>`

