org.jgraph.util

Class Spline


public class Spline
extends java.lang.Object

Interpolates given values by B-Splines.

Constructor Summary

Spline(double[] xx, double[] yy)
Creates a new Spline.

Method Summary

double
getDx(double x)
Returns the first derivation at x.
double
getValue(double x)
Returns an interpolated value.
void
setValues(double[] xx, double[] yy)
Set values for this Spline.
void
solve(double[][] A, double[] b)
Solves Ax=b and stores the solution in b.

Constructor Details

Spline

public Spline(double[] xx,
              double[] yy)
Creates a new Spline.
Parameters:
xx -
yy -

Method Details

getDx

public double getDx(double x)
Returns the first derivation at x.
Parameters:
x -
Returns:
the first derivation at x

getValue

public double getValue(double x)
Returns an interpolated value.
Parameters:
x -
Returns:
the interpolated value

setValues

public void setValues(double[] xx,
                      double[] yy)
Set values for this Spline.
Parameters:
xx -
yy -

solve

public void solve(double[][] A,
                  double[] b)
Solves Ax=b and stores the solution in b.

Copyright (C) 2001-2006 Gaudenz Alder. All rights reserved.