org.jscience.mathematics.wavelet
Class BasisFunctionLibrary

java.lang.Object
  extended by org.jscience.mathematics.wavelet.BasisFunctionLibrary
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
MatchingPursuit

public class BasisFunctionLibrary
extends java.lang.Object
implements java.lang.Cloneable

****************************************** This class is meant to be used for Fast Wavelet Transform, Matching Pursuit and related signal processing algorithm. The basic idea is to automatically build and compress a library of "basis functions". Using Morse Coding this class delivers very fast code without sacrificing anything. The only fee is the one you pay to build the object, and it is a one time fee.

Note : this class should be rewritten to use the java.util collections starting with jdk1.2.

This class is not meant to be used directly but rather, you should build on it.

It supports only 1D data. ********************************************


Field Summary
protected  DiscreteFunction DFunction
           
protected  DiscreteFunction[] Fdual
           
protected  DiscreteFunction[] Fprimary
           
 
Constructor Summary
protected BasisFunctionLibrary()
           
  BasisFunctionLibrary(DiscreteFunction f)
          Creates a new BasisFunctionLibrary object.
 
Method Summary
protected static double[][] add(double[][] v, double[][] w)
           
 void add(Multiresolution mr)
          *********************************************** Attempt to add every possible functions belonging to a multiresolution.
 void add(MultiscaleFunction f)
          ***************************************** Add the MultiscaleFunction to both the primary and dual internal arrays
 void add(MultiscaleFunction[] f)
          ***************************************** Add the array of MultiscaleFunction to both the primary and dual internal arrays
 void add(MultiscaleFunction fprimary, MultiscaleFunction fdual)
          ******************************************* Add a clone of the given MultiscaleFunctions to the internal arrays of MultiscaleFunctions
 double[] checkBiorthogonality()
          ********************************** Checks whether whether or not the biorthogonality is satisfied If so, the return array should roughly be filled with ones
 java.lang.Object clone()
          DOCUMENT ME!
protected static DiscreteFunction[] cloneArrayDiscreteFunction(MultiscaleFunction[] a)
          ********************************** Clone an arry of DiscreteFunction.
 DiscreteFunction getData()
          ***************************** get a copy of the data object (no direct access) *******************************
 DiscreteFunction getDual(int k)
          DOCUMENT ME!
 double getMorseThreshold()
          DOCUMENT ME!
 DiscreteFunction getPrimary(int k)
          DOCUMENT ME!
 double getResidue(int k)
          DOCUMENT ME!
 double[] getResidues()
          DOCUMENT ME!
 int getSize()
          ******************************* We will now attempt to match each MultiscaleFunction to the length of the data
 double getWeigth(int k)
          DOCUMENT ME!
 double[] getWeigths()
          DOCUMENT ME!
 void includeFourier()
          DOCUMENT ME!
 void includeMasslessFourier()
          DOCUMENT ME!
 double norm()
          DOCUMENT ME!
protected static double norm(double a, double b)
           
 void setData(DiscreteFunction f)
          ******************************** Allows the user to change the DiscreteFunction (see constructor).
 void setMorseThreshold(double p)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Fprimary

protected DiscreteFunction[] Fprimary

Fdual

protected DiscreteFunction[] Fdual

DFunction

protected DiscreteFunction DFunction
Constructor Detail

BasisFunctionLibrary

protected BasisFunctionLibrary()

BasisFunctionLibrary

public BasisFunctionLibrary(DiscreteFunction f)
Creates a new BasisFunctionLibrary object.

Parameters:
f - DOCUMENT ME!
Method Detail

clone

public java.lang.Object clone()
DOCUMENT ME!

Overrides:
clone in class java.lang.Object
Returns:
DOCUMENT ME!

setMorseThreshold

public void setMorseThreshold(double p)
DOCUMENT ME!

Parameters:
p - DOCUMENT ME!

getMorseThreshold

public double getMorseThreshold()
DOCUMENT ME!

Returns:
DOCUMENT ME!

includeFourier

public void includeFourier()
DOCUMENT ME!


includeMasslessFourier

public void includeMasslessFourier()
DOCUMENT ME!


getPrimary

public DiscreteFunction getPrimary(int k)
DOCUMENT ME!

Parameters:
k - DOCUMENT ME!
Returns:
DOCUMENT ME!

getDual

public DiscreteFunction getDual(int k)
DOCUMENT ME!

Parameters:
k - DOCUMENT ME!
Returns:
DOCUMENT ME!

setData

public void setData(DiscreteFunction f)
******************************** Allows the user to change the DiscreteFunction (see constructor).

Throws:
java.lang.IllegalArgumentException - if you try to change the number of data values (dimension of the DiscreteFunction) **********************************

getData

public DiscreteFunction getData()
***************************** get a copy of the data object (no direct access) *******************************


cloneArrayDiscreteFunction

protected static DiscreteFunction[] cloneArrayDiscreteFunction(MultiscaleFunction[] a)
********************************** Clone an arry of DiscreteFunction. This method is needed to handle eventual null object. ************************************


add

public void add(MultiscaleFunction fprimary,
                MultiscaleFunction fdual)
******************************************* Add a clone of the given MultiscaleFunctions to the internal arrays of MultiscaleFunctions. *********************************************


add

public void add(MultiscaleFunction f)
***************************************** Add the MultiscaleFunction to both the primary and dual internal arrays. *******************************************


add

public void add(MultiscaleFunction[] f)
***************************************** Add the array of MultiscaleFunction to both the primary and dual internal arrays. *******************************************


add

public void add(Multiresolution mr)
*********************************************** Attempt to add every possible functions belonging to a multiresolution. Entirely automatic! Limited to dyadic multiresolutions. *************************************************


getResidues

public double[] getResidues()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getResidue

public double getResidue(int k)
DOCUMENT ME!

Parameters:
k - DOCUMENT ME!
Returns:
DOCUMENT ME!

getWeigths

public double[] getWeigths()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getWeigth

public double getWeigth(int k)
DOCUMENT ME!

Parameters:
k - DOCUMENT ME!
Returns:
DOCUMENT ME!

norm

public double norm()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getSize

public int getSize()
******************************* We will now attempt to match each MultiscaleFunction to the length of the data. *********************************


norm

protected static double norm(double a,
                             double b)

checkBiorthogonality

public double[] checkBiorthogonality()
********************************** Checks whether whether or not the biorthogonality is satisfied If so, the return array should roughly be filled with ones. ************************************


add

protected static double[][] add(double[][] v,
                                double[][] w)