org.jscience.mathematics.wavelet
Class FWTPacketCoef

java.lang.Object
  extended by org.jscience.mathematics.wavelet.FWTPacketCoef
All Implemented Interfaces:
java.lang.Cloneable

public final class FWTPacketCoef
extends java.lang.Object
implements java.lang.Cloneable

This class is used to encapsulate wavelet packets coefficients.


Field Summary
protected  double[][] coefs
          DOCUMENT ME!
protected  boolean[] StandardChoice
          DOCUMENT ME!
 
Constructor Summary
FWTPacketCoef()
          Creates a new FWTPacketCoef object.
FWTPacketCoef(double[][] v, boolean[] b)
          ******************************************* *********************************************
 
Method Summary
 java.lang.Object clone()
          Return a copy of this object
 void compress(double p)
          Compresses by zero-ing any value below a given percentile cut-off.
static double[] compress(double[] v, double p)
          Compresses by zero-ing any value below a given percentile cut-off.
 void compress(double p, int k)
          Compresses by zero-ing any value below a given percentile cut-off.
 void compressHard(double p)
          Compresses by zero-ing any value below a given cut-off.
static double[] compressHard(double[] v, double seuil)
          Compresses by zero-ing any value below a given cut-off.
 void compressHard(double p, int k)
          Compresses by zero-ing any value below a given cut-off.
 void denoise(double p)
          Denoises by zero-ing any value above a given percentile cut-off.
static double[] denoise(double[] v, double p)
          Denoises by zero-ing any value above a given percentile cut-off.
 void denoise(double p, int k)
          Denoises by zero-ing any value above a given percentile cut-off.
 void denoiseHard(double p)
          Denoises by zero-ing any value above a given cut-off.
static double[] denoiseHard(double[] v, double seuil)
          Denoises by zero-ing any value above a given cut-off.
 void denoiseHard(double p, int k)
          Denoises by zero-ing any value above a given cut-off.
 int dimension(int i)
           
 double energyRatio(int i)
          DOCUMENT ME!
 double entropy()
          DOCUMENT ME!
 double[][] getCoefs()
           
 int getJ()
           
 double icf()
          Compute the Shannon entropy.
 double mass(int i)
           
 double[] norm()
          Compute the L2 norm of the coefficients
 double norm(int i)
          Compute the L2 norm of the coefficients at "scale" i.
 Signal rebuildSignal(Filter filtreprimaire)
          DOCUMENT ME!
 Signal rebuildSignal(Filter filtreprimaire, double[] param)
          DOCUMENT ME!
 void setCoefs(double[][] v)
          DOCUMENT ME!
 void setCoefs(double[] v, int i)
          DOCUMENT ME!
 void setPacket(boolean[] b)
          Allows the user to set the Wavelet Packet chosen
 double sumEnergies()
          DOCUMENT ME!
 double sumSquares(int i)
          Compute the sum of the squares of the coefficients
 double sumVariance()
          DOCUMENT ME!
 void synthesize(Filter filtreprimaire)
          DOCUMENT ME!
 void synthesize(Filter filtreprimaire, double[] param)
          DOCUMENT ME!
 void synthesize(Filter filtreprimaire, double[] param, int jmax)
          DOCUMENT ME!
 void synthesize(Filter filtreprimaire, int jmax)
          DOCUMENT ME!
 void synthesizeAll(Filter filtreprimaire)
          DOCUMENT ME!
 void synthesizeTout(Filter filtreprimaire, double[] param)
          DOCUMENT ME!
 double variance(int i)
           
 double varianceICF()
          DOCUMENT ME!
 double varianceRatio(int i)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

coefs

protected double[][] coefs
DOCUMENT ME!


StandardChoice

protected boolean[] StandardChoice
DOCUMENT ME!

Constructor Detail

FWTPacketCoef

public FWTPacketCoef()
Creates a new FWTPacketCoef object.


FWTPacketCoef

public FWTPacketCoef(double[][] v,
                     boolean[] b)
******************************************* *********************************************

Method Detail

clone

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

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

getJ

public int getJ()
Returns:
DOCUMENT ME!

dimension

public int dimension(int i)
Parameters:
i - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

getCoefs

public double[][] getCoefs()
Returns:
DOCUMENT ME!

norm

public double[] norm()
Compute the L2 norm of the coefficients

Returns:
DOCUMENT ME!

norm

public double norm(int i)
Compute the L2 norm of the coefficients at "scale" i.

Parameters:
i - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

sumSquares

public double sumSquares(int i)
Compute the sum of the squares of the coefficients

Parameters:
i - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

mass

public double mass(int i)
Parameters:
i - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

variance

public double variance(int i)
Parameters:
i - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

sumEnergies

public double sumEnergies()
DOCUMENT ME!

Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

entropy

public double entropy()
DOCUMENT ME!

Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

sumVariance

public double sumVariance()
DOCUMENT ME!

Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

energyRatio

public double energyRatio(int i)
DOCUMENT ME!

Parameters:
i - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

varianceRatio

public double varianceRatio(int i)
DOCUMENT ME!

Parameters:
i - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

icf

public double icf()
Compute the Shannon entropy.

Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

varianceICF

public double varianceICF()
DOCUMENT ME!

Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

setCoefs

public void setCoefs(double[][] v)
DOCUMENT ME!

Parameters:
v - DOCUMENT ME!

setPacket

public void setPacket(boolean[] b)
Allows the user to set the Wavelet Packet chosen

Parameters:
b - DOCUMENT ME!

setCoefs

public void setCoefs(double[] v,
                     int i)
DOCUMENT ME!

Parameters:
v - DOCUMENT ME!
i - DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

synthesize

public void synthesize(Filter filtreprimaire,
                       double[] param)
DOCUMENT ME!

Parameters:
filtreprimaire - DOCUMENT ME!
param - DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

synthesize

public void synthesize(Filter filtreprimaire,
                       double[] param,
                       int jmax)
DOCUMENT ME!

Parameters:
filtreprimaire - DOCUMENT ME!
param - DOCUMENT ME!
jmax - DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

synthesizeTout

public void synthesizeTout(Filter filtreprimaire,
                           double[] param)
DOCUMENT ME!

Parameters:
filtreprimaire - DOCUMENT ME!
param - DOCUMENT ME!

synthesize

public void synthesize(Filter filtreprimaire)
DOCUMENT ME!

Parameters:
filtreprimaire - DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

synthesize

public void synthesize(Filter filtreprimaire,
                       int jmax)
DOCUMENT ME!

Parameters:
filtreprimaire - DOCUMENT ME!
jmax - DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

synthesizeAll

public void synthesizeAll(Filter filtreprimaire)
DOCUMENT ME!

Parameters:
filtreprimaire - DOCUMENT ME!

rebuildSignal

public Signal rebuildSignal(Filter filtreprimaire)
DOCUMENT ME!

Parameters:
filtreprimaire - DOCUMENT ME!
Returns:
DOCUMENT ME!

rebuildSignal

public Signal rebuildSignal(Filter filtreprimaire,
                            double[] param)
DOCUMENT ME!

Parameters:
filtreprimaire - DOCUMENT ME!
param - DOCUMENT ME!
Returns:
DOCUMENT ME!

denoise

public void denoise(double p)
Denoises by zero-ing any value above a given percentile cut-off.

Parameters:
p - percentile cut-off, must be between 0 and 1.

denoise

public void denoise(double p,
                    int k)
Denoises by zero-ing any value above a given percentile cut-off.

Parameters:
p - percentile cut-off, must be between 0 and 1.
k - the index of the coefficient array to denoise.

denoise

public static double[] denoise(double[] v,
                               double p)
Denoises by zero-ing any value above a given percentile cut-off.

Parameters:
v - an array to denoise.
p - percentile cut-off, must be between 0 and 1.
Returns:
DOCUMENT ME!

compress

public void compress(double p)
Compresses by zero-ing any value below a given percentile cut-off.

Parameters:
p - percentile cut-off, must be between 0 and 1.

compress

public void compress(double p,
                     int k)
Compresses by zero-ing any value below a given percentile cut-off.

Parameters:
p - percentile cut-off, must be between 0 and 1.
k - the index of the coefficient array to compress.

compress

public static double[] compress(double[] v,
                                double p)
Compresses by zero-ing any value below a given percentile cut-off.

Parameters:
v - an array to compress.
p - percentile cut-off, must be between 0 and 1.
Returns:
DOCUMENT ME!

denoiseHard

public void denoiseHard(double p)
Denoises by zero-ing any value above a given cut-off.

Parameters:
p - cut-off.

denoiseHard

public void denoiseHard(double p,
                        int k)
Denoises by zero-ing any value above a given cut-off.

Parameters:
p - cut-off.
k - the index of the coefficient array to denoise.

denoiseHard

public static double[] denoiseHard(double[] v,
                                   double seuil)
Denoises by zero-ing any value above a given cut-off.

Parameters:
v - an array to denoise.
seuil - cut-off/threshold.
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

compressHard

public void compressHard(double p)
Compresses by zero-ing any value below a given cut-off.

Parameters:
p - cut-off.

compressHard

public void compressHard(double p,
                         int k)
Compresses by zero-ing any value below a given cut-off.

Parameters:
p - cut-off.
k - the index of the coefficient array to compress.

compressHard

public static double[] compressHard(double[] v,
                                    double seuil)
Compresses by zero-ing any value below a given cut-off.

Parameters:
v - an array to compress.
seuil - cut-off/threshold.
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!