Java API By Example, From Geeks To Geeks.

# Java > Open Source Codes > JSci > maths > wavelet > daubechies8 > Wavelet8

 `1 package JSci.maths.wavelet.daubechies8;2 3 import JSci.maths.wavelet.*;4 5 /******************************************6 * Daubechies wavelets adapted to the7 * interval by Meyer. Thanks to Pierre Vial8 * for the filters.9 * @author Daniel Lemire10 *****************************************/11 public final class Wavelet8 extends MultiscaleFunction implements Cloneable {12     private int n0;13     private int k;14     private final static Daubechies8 cdf=new Daubechies8();15 16   /*******************************17   * Return a String representation18   * of the object19   ********************************/20   public String toString() {21     String ans=new String ("[n0=");22     ans.concat(Integer.toString(n0));23     ans.concat("][k=");24     ans.concat(Integer.toString(k));25     ans.concat("]");26     return(ans);27   }28   /*****************************************29   * Check if another object is equal to this30   * Wavelet8 object31   ******************************************/32   public boolean equals(Object a) {33     if((a!=null) && (a instanceof Wavelet8)) {34       Wavelet8 iv=(Wavelet8)a;35       return (this.dimension(0)==iv.dimension(0)) && (this.position()==iv.position());36     }37     return false;38   }39     public Wavelet8 (int N0, int K) {40         setParameters(N0,K);41     }42     public Wavelet8 () {43     }44     /****************************************45   * This method is used to compute46   * how the number of scaling functions47   * changes from on scale to the other.48   * Basically, if you have k scaling49   * function and a filter of type t, you'll50   * have 2*k+t scaling functions at the51   * next scale (dyadic case).52   * Notice that this method assumes53   * that one is working with the dyadic54   * grid while the method "previousDimension"55   * define in the interface "filter" doesn't.56     ******************************************/57     public int getFilterType () {58                 return(cdf.filtretype);59     }60   /**********************************************61   * Set the parameters for this object62   * @param N0 number of scaling function on the63   * scale of this object64   * @param K position or number of this object65   * @exception IllegalScalingException if N0 is not66   * large enough67   ***********************************************/68     public void setParameters(int N0, int K) {69         if(N0