# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.analysis.curvefit.interpolation.univariate

## Enum CubicHermite.Tangents

• ### Enum Constant Summary

Enum Constants
Enum Constant and Description
CATMULL_ROM
Catmull-Rom splines are a special case of Cardinal splines and are defined as: $(\frac{\partial y}{\partial x})_k = \frac{y_{k+1} - y_{k-1}}{x_{k+1} - x_{k-1}}. FINITE_DIFFERENCE The simplest choice is the three-point difference, not requiring constant interval lengths. • ### Method Summary All Methods Modifier and Type Method and Description static CubicHermite.Tangents valueOf(String name) Returns the enum constant of this type with the specified name. static CubicHermite.Tangents[] values() Returns an array containing the constants of this enum type, in the order they are declared. • ### Methods inherited from class java.lang.Enum clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf • ### Methods inherited from class java.lang.Object getClass, notify, notifyAll, wait, wait, wait • ### Methods inherited from interface com.numericalmethod.suanshu.analysis.curvefit.interpolation.univariate.CubicHermite.Tangent tangentAt • ### Enum Constant Detail • #### CATMULL_ROM public static final CubicHermite.Tangents CATMULL_ROM Catmull-Rom splines are a special case of Cardinal splines and are defined as: \[ (\frac{\partial y}{\partial x})_k = \frac{y_{k+1} - y_{k-1}}{x_{k+1} - x_{k-1}}.$ At the boundaries, two adjacent points are used instead.
Wikipedia: Cubic Hermite spline - Catmull-Rom spline
• #### FINITE_DIFFERENCE

public static final CubicHermite.Tangents FINITE_DIFFERENCE
The simplest choice is the three-point difference, not requiring constant interval lengths. The tangent at point k is defined as: $m_k = \frac{y_{k+1}-y_k}{2(x_{k+1}-x_{k})} + \frac{y_k-y_{k-1}}{2(x_k-x_{k-1})}$ for internal points, and one-sided difference at the endpoints.
Wikipedia: Cubic Hermite spline - Finite difference
• ### Method Detail

• #### values

public static CubicHermite.Tangents[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (CubicHermite.Tangents c : CubicHermite.Tangents.values())
System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared
• #### valueOf

public static CubicHermite.Tangents valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null