JSci.maths.wavelet
Class FWTPacketCoef

java.lang.Object
  extended by JSci.maths.wavelet.FWTPacketCoef
All Implemented Interfaces:
java.lang.Cloneable, NumericalConstants

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

This class is used to encapsulate wavelet packets coefficients.


Field Summary
protected  double[][] coefs
           
(package private) static double normalisation
           
protected  boolean[] StandardChoice
           
 
Fields inherited from interface JSci.maths.NumericalConstants
GAMMA, GOLDEN_RATIO, LOG10, SQRT2, SQRT2PI, TWO_PI
 
Constructor Summary
FWTPacketCoef()
           
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)
           
 double entropy()
           
 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)
           
 Signal rebuildSignal(Filter filtreprimaire, double[] param)
           
 void setCoefs(double[][] v)
           
 void setCoefs(double[] v, int i)
           
 void setPacket(boolean[] b)
          Allows the user to set the Wavelet Packet chosen
 double sumEnergies()
           
 double sumSquares(int i)
          Compute the sum of the squares of the coefficients
 double sumVariance()
           
 void synthesize(Filter filtreprimaire)
           
 void synthesize(Filter filtreprimaire, double[] param)
           
 void synthesize(Filter filtreprimaire, double[] param, int jmax)
           
 void synthesize(Filter filtreprimaire, int jmax)
           
 void synthesizeAll(Filter filtreprimaire)
           
 void synthesizeTout(Filter filtreprimaire, double[] param)
           
 double variance(int i)
           
 double varianceICF()
           
 double varianceRatio(int i)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

coefs

protected double[][] coefs

StandardChoice

protected boolean[] StandardChoice

normalisation

static final double normalisation
See Also:
Constant Field Values
Constructor Detail

FWTPacketCoef

public FWTPacketCoef()

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

getJ

public int getJ()

dimension

public int dimension(int i)

getCoefs

public double[][] getCoefs()

norm

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


norm

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


sumSquares

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


mass

public double mass(int i)

variance

public double variance(int i)

sumEnergies

public double sumEnergies()

entropy

public double entropy()

sumVariance

public double sumVariance()

energyRatio

public double energyRatio(int i)

varianceRatio

public double varianceRatio(int i)

icf

public double icf()
Compute the Shannon entropy.


varianceICF

public double varianceICF()

setCoefs

public void setCoefs(double[][] v)

setPacket

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


setCoefs

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

synthesize

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

synthesize

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

synthesizeTout

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

synthesize

public void synthesize(Filter filtreprimaire)

synthesize

public void synthesize(Filter filtreprimaire,
                       int jmax)

synthesizeAll

public void synthesizeAll(Filter filtreprimaire)

rebuildSignal

public Signal rebuildSignal(Filter filtreprimaire)

rebuildSignal

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

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.

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.

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.

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.