1 2 package JSci.maths.wavelet.daubechies5; 3 4 import JSci.maths.wavelet.*; 5 11 public final class Wavelet5 extends MultiscaleFunction implements Cloneable { 12 private int n0; 13 private int k; 14 private static final Daubechies5 cdf=new Daubechies5(); 15 public Wavelet5 (int N0, int K) { 16 setParameters(N0,K); 17 } 18 public Wavelet5 () { 19 } 20 24 public boolean equals(Object a) { 25 if((a!=null) && (a instanceof Wavelet5)) { 26 Wavelet5 iv=(Wavelet5)a; 27 return (this.dimension(0)==iv.dimension(0)) && (this.position()==iv.position()); 28 } 29 return false; 30 } 31 32 36 public String toString() { 37 String ans=new String ("[n0="); 38 ans.concat(Integer.toString(n0)); 39 ans.concat("][k="); 40 ans.concat(Integer.toString(k)); 41 ans.concat("]"); 42 return(ans); 43 } 44 57 public int getFilterType () { 58 return(cdf.filtretype); 59 } 60 68 public void setParameters(int N0, int K) { 69 if(N0<cdf.minlength) { 70 throw new IllegalScalingException(N0,cdf.minlength); 71 } 72 n0=N0; 73 k=K; 74 } 75 78 public Object clone() { 79 Wavelet5 w=(Wavelet5) super.clone(); 80 w.n0=n0; 81 w.k=k; 82 return(w); 83 } 84 89 public double[] evaluate ( int j) { 90 return(cdf.evalWavelet (n0, k, j)); 91 } 92 99 public int dimension(int jfin) { 100 return(Cascades.dimension(n0,jfin+1,cdf.filtretype)); 101 } 102 106 public int dimension() { 107 return(dimension(0)); 108 } 109 110 116 public int position() { 117 return(k); 118 } 119 } 120 | Popular Tags |