org.jscience.mathematics.wavelet
Class FWTCoef

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

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

This class is used to encapsulate wavelet coefficients.


Field Summary
protected  double[][] coefs
          DOCUMENT ME!
 
Constructor Summary
FWTCoef()
          Creates a new FWTCoef object.
FWTCoef(double[][] v)
          ******************************************* *********************************************
 
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)
           
 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 synthesizeAll(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
DOCUMENT ME!

Constructor Detail

FWTCoef

public FWTCoef()
Creates a new FWTCoef object.


FWTCoef

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

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. Wavelet coefficients are into the "scale" 1 to ... and the scale 0 is the coarsest scale containing scaling functions coefficients

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()
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

entropy

public double entropy()
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

sumVariance

public double sumVariance()
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

energyRatio

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

varianceRatio

public double varianceRatio(int i)
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()
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

setCoefs

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

setCoefs

public void setCoefs(double[] v,
                     int i)
Parameters:
v - DOCUMENT ME!
i - DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

synthesize

public void synthesize(Filter filtreprimaire,
                       double[] param)
Parameters:
filtreprimaire - DOCUMENT ME!
param - DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

synthesize

public void synthesize(Filter filtreprimaire,
                       double[] param,
                       int jmax)
Parameters:
filtreprimaire - DOCUMENT ME!
param - DOCUMENT ME!
jmax - DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

synthesizeAll

public void synthesizeAll(Filter filtreprimaire,
                          double[] param)
Parameters:
filtreprimaire - DOCUMENT ME!
param - DOCUMENT ME!

synthesize

public void synthesize(Filter filtreprimaire)
Parameters:
filtreprimaire - DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

synthesize

public void synthesize(Filter filtreprimaire,
                       int jmax)
Parameters:
filtreprimaire - DOCUMENT ME!
jmax - DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

synthesizeAll

public void synthesizeAll(Filter filtreprimaire)
Parameters:
filtreprimaire - DOCUMENT ME!

rebuildSignal

public Signal rebuildSignal(Filter filtreprimaire)
Parameters:
filtreprimaire - DOCUMENT ME!
Returns:
DOCUMENT ME!

rebuildSignal

public Signal rebuildSignal(Filter filtreprimaire,
                            double[] param)
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!