org.jscience.mathematics.wavelet.splines
Class QuadraticSpline

java.lang.Object
  extended by org.jscience.mathematics.wavelet.MultiscaleFunction
      extended by org.jscience.mathematics.wavelet.splines.Spline
          extended by org.jscience.mathematics.wavelet.splines.QuadraticSpline
All Implemented Interfaces:
java.lang.Cloneable, Filter

public class QuadraticSpline
extends Spline
implements Filter, java.lang.Cloneable

This class is used to generate quadratic splines to be used as wavelets or related functions. It can also be used for basic interpolation.


Field Summary
protected static int filtretype
          DOCUMENT ME!
 
Constructor Summary
QuadraticSpline()
          ************************************ **************************************
QuadraticSpline(double[] v)
          ************************************ **************************************
 
Method Summary
 java.lang.Object clone()
          Return a copy of this object
 LinearSpline derive()
          compute the derivative of the function - useful for numerical analysis
 LinearSpline derive(double a, double b)
          compute the derivative of the function - useful for numerical analysis
 int dimension()
          Number of knots
 int dimension(int jfin)
          Number of knots after j iterations
 boolean equals(java.lang.Object a)
          Check if another object is equal to this QuadraticSpline object
 double[] evaluate(int jfin)
          Return as an array the sampled values of the function
 int getFilterType()
          This method is used to compute how the number of scaling functions changes from on scale to the other.
 double getValue(int i)
          Get the i th sampled value of the function.
 double[] highpass(double[] gete)
          This is the implementation of the highpass Filter.
 double[] highpass(double[] v, double[] param)
          This is the implementation of the highpass Filter.
 double[] interpolate(int j)
          Return as an array the interpolated values of the function.
 double[] lowpass(double[] gete)
          This is the implementation of the lowpass Filter.
 double[] lowpass(double[] v, double[] param)
          This is the implementation of the lowpass Filter.
 int previousDimension(int k)
          This method return the number of "scaling" functions at the previous scale given a number of scaling functions.
 void setValue(int i, double d)
          Set a particular value
 void setValues(double[] v)
          Set the sampled values of the function to the specified array
 java.lang.String toString()
          Return a String representation of the object
 
Methods inherited from class org.jscience.mathematics.wavelet.MultiscaleFunction
mass, mass
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

filtretype

protected static final int filtretype
DOCUMENT ME!

See Also:
Constant Field Values
Constructor Detail

QuadraticSpline

public QuadraticSpline(double[] v)
************************************ **************************************


QuadraticSpline

public QuadraticSpline()
************************************ **************************************

Method Detail

toString

public java.lang.String toString()
Return a String representation of the object

Specified by:
toString in class Spline
Returns:
DOCUMENT ME!

getFilterType

public int getFilterType()
This method is used to compute how the number of scaling functions changes from on scale to the other. Basically, if you have k scaling function and a Filter of type t, you'll have 2k+t scaling functions at the next scale (dyadic case). Notice that this method assumes that one is working with the dyadic grid while the method "previousDimension" define in the interface "Filter" doesn't.

Specified by:
getFilterType in class Spline
Returns:
DOCUMENT ME!

equals

public boolean equals(java.lang.Object a)
Check if another object is equal to this QuadraticSpline object

Specified by:
equals in class Spline
Parameters:
a - DOCUMENT ME!
Returns:
DOCUMENT ME!

previousDimension

public int previousDimension(int k)
This method return the number of "scaling" functions at the previous scale given a number of scaling functions. The answer is always smaller than the provided value (about half since this is a dyadic implementation). This relates to the same idea as the "Filter type". It is used by the interface "Filter".

Specified by:
previousDimension in interface Filter
Parameters:
k - DOCUMENT ME!
Returns:
DOCUMENT ME!

lowpass

public double[] lowpass(double[] v,
                        double[] param)
This is the implementation of the lowpass Filter. It is used by the interface "Filter". Lowpass filters are normalized so that they preserve constants away from the boundaries.

Specified by:
lowpass in interface Filter
Parameters:
v - DOCUMENT ME!
param - DOCUMENT ME!
Returns:
DOCUMENT ME!

highpass

public double[] highpass(double[] v,
                         double[] param)
This is the implementation of the highpass Filter. It is used by the interface "Filter". This class doesn't have a highpass Filter so that this method is only provided to be compatible with the interface.

Specified by:
highpass in interface Filter
Parameters:
v - DOCUMENT ME!
param - DOCUMENT ME!
Returns:
DOCUMENT ME!

lowpass

public double[] lowpass(double[] gete)
This is the implementation of the lowpass Filter. It is used by the interface "Filter". Lowpass filters are normalized so that they preserve constants away from the boundaries.

Specified by:
lowpass in interface Filter
Parameters:
gete - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

highpass

public double[] highpass(double[] gete)
This is the implementation of the highpass Filter. It is used by the interface "Filter". This class doesn't have a highpass Filter so that this method is only provided to be compatible with the interface.

Specified by:
highpass in interface Filter
Parameters:
gete - DOCUMENT ME!
Returns:
DOCUMENT ME!

clone

public java.lang.Object clone()
Return a copy of this object

Overrides:
clone in class Spline
Returns:
DOCUMENT ME!

getValue

public double getValue(int i)
Get the i th sampled value of the function.

Parameters:
i - position (knot)
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - if i is not a within 0 and the last knot (dimension()-1)

setValue

public void setValue(int i,
                     double d)
Set a particular value

Parameters:
i - position (knot)
d - value
Throws:
java.lang.IllegalArgumentException - if the parameter i is negative

setValues

public void setValues(double[] v)
Set the sampled values of the function to the specified array

Parameters:
v - DOCUMENT ME!

derive

public LinearSpline derive()
compute the derivative of the function - useful for numerical analysis

Returns:
DOCUMENT ME!

derive

public LinearSpline derive(double a,
                           double b)
compute the derivative of the function - useful for numerical analysis

Parameters:
a - left boundary of the interval
b - right boundary of the interval
Returns:
DOCUMENT ME!

dimension

public int dimension()
Number of knots

Specified by:
dimension in class Spline
Returns:
DOCUMENT ME!

dimension

public int dimension(int jfin)
Number of knots after j iterations

Specified by:
dimension in class Spline
Parameters:
jfin - number of iterations
Returns:
DOCUMENT ME!

interpolate

public double[] interpolate(int j)
Return as an array the interpolated values of the function. WARNING: Will return the same values as the evaluate method while it should really proceed by interpolation. Postprocessing should be added to this method in order that it returns the correct values.

Specified by:
interpolate in class Spline
Parameters:
j - number of iterations
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

evaluate

public double[] evaluate(int jfin)
Return as an array the sampled values of the function

Specified by:
evaluate in class Spline
Parameters:
jfin - number of iterations
Returns:
DOCUMENT ME!