1 2 package JSci.maths.wavelet.cdf3_5; 3 4 import JSci.maths.wavelet.*; 5 6 13 public final class DualWavelet3_5 extends MultiscaleFunction implements Cloneable { 14 private int n0; 15 private int k; 16 private static CDF3_5 cdf=new CDF3_5(); 17 18 public DualWavelet3_5 (int N0, int K) { 19 setParameters(N0,K); 20 } 21 25 public boolean equals(Object a) { 26 if((a!=null) && (a instanceof DualWavelet3_5) ) { 27 DualWavelet3_5 iv=(DualWavelet3_5)a; 28 return (this.dimension(0)==iv.dimension(0)) && (this.position()==iv.position()); 29 } 30 return false; 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 61 public DualWavelet3_5 () { 62 } 63 71 public void setParameters(int N0, int K) { 72 if(N0<cdf.minlength) { 73 throw new IllegalScalingException(N0,cdf.minlength); 74 } 75 n0=N0; 76 k=K; 77 } 78 81 public Object clone() { 82 DualWavelet3_5 s = (DualWavelet3_5)super.clone(); 83 s.n0=n0; 84 s.k=k; 85 return(s); 86 } 87 92 public double[] evaluate (int j) { 93 return(cdf.evalWavelet (n0, k, j)); 94 } 95 102 public int dimension( int jfin) { 103 return(Cascades.dimension(n0,jfin+1,cdf.filtretype)); 104 } 105 109 public int dimension() { 110 return(dimension(0)); 111 } 112 113 119 public int position() { 120 return(k); 121 } 122 } 123 | Popular Tags |