1 2 package JSci.maths.wavelet.cdf3_5; 3 4 import JSci.maths.wavelet.*; 5 12 public final class DualScaling3_5 extends MultiscaleFunction implements Cloneable { 13 private int n0; 14 private int k; 15 private static CDF3_5 cdf=new CDF3_5(); 16 20 public boolean equals(Object a) { 21 if((a!=null) && (a instanceof DualScaling3_5) ) { 22 DualScaling3_5 iv=(DualScaling3_5)a; 23 return (this.dimension(0)==iv.dimension(0)) && (this.position()==iv.position()); 24 } 25 return false; 26 } 27 31 public String toString() { 32 String ans=new String ("[n0="); 33 ans.concat(Integer.toString(n0)); 34 ans.concat("][k="); 35 ans.concat(Integer.toString(k)); 36 ans.concat("]"); 37 return(ans); 38 } 39 52 public int getFilterType () { 53 return(cdf.filtretype); 54 } 55 public DualScaling3_5 (int N0, int K) { 56 setParameters(N0,K); 57 } 58 61 public Object clone() { 62 DualScaling3_5 s = (DualScaling3_5) super.clone(); 63 s.n0=n0; 64 s.k=k; 65 return(s); 66 } 67 68 public DualScaling3_5 () { 69 } 70 78 public void setParameters(int N0, int K) { 79 if(N0<cdf.minlength) { 80 throw new IllegalScalingException(N0,cdf.minlength); 81 } 82 n0=N0; 83 k=K; 84 } 85 90 public double[] evaluate ( int j) { 91 return(cdf.evalScaling (n0, k, j)); 92 } 93 94 100 public int dimension(int jfin) { 101 return(Cascades.dimension(n0,jfin,cdf.filtretype)); 102 } 103 107 public int dimension() { 108 return(dimension(0)); 109 } 110 116 public int position() { 117 return(k); 118 } 119 } 120 | Popular Tags |