1 2 package JSci.maths.wavelet.daubechies5; 3 4 import JSci.maths.wavelet.*; 5 11 public final class Scaling5 extends MultiscaleFunction implements Cloneable { 12 private int n0; 13 private int k; 14 private static final Daubechies5 cdf=new Daubechies5(); 15 public Scaling5 (int N0, int K) { 16 setParameters(N0,K); 17 } 18 22 public boolean equals(Object a) { 23 if((a!=null) && (a instanceof Scaling5)) { 24 Scaling5 iv=(Scaling5)a; 25 return (this.dimension(0)==iv.dimension(0)) && (this.position()==iv.position()); 26 } 27 return false; 28 } 29 33 public String toString() { 34 String ans=new String ("[n0="); 35 ans.concat(Integer.toString(n0)); 36 ans.concat("][k="); 37 ans.concat(Integer.toString(k)); 38 ans.concat("]"); 39 return(ans); 40 } 41 42 public Scaling5 () { 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 Scaling5 s=(Scaling5) super.clone(); 80 s.n0=n0; 81 s.k=k; 82 return(s); 83 } 84 85 90 public double[] evaluate ( int j) { 91 return(cdf.evalScaling (n0, k, j)); 92 } 93 99 public int dimension(int jfin) { 100 return(Cascades.dimension(n0,jfin,cdf.filtretype)); 101 } 102 106 public int dimension() { 107 return(dimension(0)); 108 } 109 115 public int position() { 116 return(k); 117 } 118 } 119 | Popular Tags |