Enum CubicHermite.Tangents
- java.lang.Object
-
- java.lang.Enum<CubicHermite.Tangents>
-
- dev.nm.analysis.curvefit.interpolation.univariate.CubicHermite.Tangents
-
- All Implemented Interfaces:
CubicHermite.Tangent
,Serializable
,Comparable<CubicHermite.Tangents>
- Enclosing class:
- CubicHermite
public static enum CubicHermite.Tangents extends Enum<CubicHermite.Tangents> implements CubicHermite.Tangent
-
-
Enum Constant Summary
Enum Constants Enum Constant 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 Static Methods Concrete Methods Modifier and Type Method 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 interface dev.nm.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.
-
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.
-
-
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 nameNullPointerException
- if the argument is null
-
-