org.hermit.geometry.spline
Class Cubic

java.lang.Object
  extended by org.hermit.geometry.spline.Cubic

public final class Cubic
extends java.lang.Object

Representation of a cubic polynomial.


Constructor Summary
Cubic(double a, double b, double c, double d)
          Create a cubic polynomial of form a + b*x + c*x^2 + d*x^3.
 
Method Summary
 double eval(double x)
          Evaluate the polynomial for a given value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cubic

public Cubic(double a,
             double b,
             double c,
             double d)
Create a cubic polynomial of form a + b*x + c*x^2 + d*x^3.

Parameters:
a - A coefficient.
b - B coefficient.
c - C coefficient.
d - D coefficient.
Method Detail

eval

public double eval(double x)
Evaluate the polynomial for a given value.

Parameters:
x - X value to evaluate for.
Returns:
The value of the polynomial for the given X.