com.mxgraph.util

## Class mxSpline1D

- java.lang.Object
- - com.mxgraph.util.mxSpline1D

-     public class mxSpline1D
      extends java.lang.Object

  One dimension of a spline curve

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected double[]` | `a`
    `protected double[]` | `b`
    `protected double[]` | `c`
    `protected double[]` | `d`
    `protected double[]` | `len`
    `protected double[]` | `pos1D`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `mxSpline1D(double[] controlPointProportions, double[] positions1D)` Creates a new Spline.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getDx(double x)` Returns the first derivation at x.
    `double` | `getFastValue(double x)` Returns an interpolated value.
    `double` | `getValue(double x)` Returns an interpolated value.
    `void` | `setValues(double[] controlPointProportions, double[] positions1D)` Set values for this Spline.
    `void` | `solve(double[][] A, double[] b)` Solves Ax=b and stores the solution in b.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### len

          protected double[] len

    - #### pos1D

          protected double[] pos1D

    - #### a

          protected double[] a

    - #### b

          protected double[] b

    - #### c

          protected double[] c

    - #### d

          protected double[] d

  - ### Constructor Detail

    - #### mxSpline1D

          public mxSpline1D(double[] controlPointProportions,
                    double[] positions1D)

      Creates a new Spline.
      Parameters:
        `controlPointProportions` - the proportion along the curve, from 0->1 that each control point lies on
        `positions1D` - the co-ordinate position in the current dimension that each control point lies on

  - ### Method Detail

    - #### setValues

          public void setValues(double[] controlPointProportions,
                       double[] positions1D)

      Set values for this Spline.
      Parameters:
        `controlPointProportions` - the proportion along the curve, from 0->1 that each control point lies on
        `positions1D` - the co-ordinate position in the current dimension that each control point lies on

    - #### getValue

          public double getValue(double x)

      Returns an interpolated value.
      Parameters:
        `x` -
      Returns:
        the interpolated value

    - #### getFastValue

          public double getFastValue(double x)

      Returns an interpolated value. To be used when a long sequence of values are required in order, but ensure checkValues() is called beforehand to ensure the boundary checks from getValue() are made
      Parameters:
        `x` -
      Returns:
        the interpolated value

    - #### getDx

          public double getDx(double x)

      Returns the first derivation at x.
      Parameters:
        `x` -
      Returns:
        the first derivation at x

    - #### solve

          public void solve(double[][] A,
                   double[] b)

      Solves Ax=b and stores the solution in b.

Copyright (c) 2010 Gaudenz Alder. All rights reserved.