package jsci.maths.wavelet.cdf2_4;

import jsci.maths.wavelet.*;


/******************************************
* Cohen-Daubechies-Feauveau
* with N=2 and
* Ntilde=4 adapted to the interval
* by Deslauriers-Dubuc-Lemire
* @author Daniel Lemire
*****************************************/
public final class DualWavelet2_4 extends MultiscaleFunction  implements Cloneable {
	private int n0;
	private int k;
	private static CDF2_4 cdf=new CDF2_4();
   /*****************************************
  * Check if another object is equal to this
  * DualWavelet2_4 object
  ******************************************/
    public boolean equals(Object a) {
    if((a!=null) && (a instanceof DualWavelet2_4))  {
      DualWavelet2_4 iv=(DualWavelet2_4)a;
      return (this.dimension(0)==iv.dimension(0)) && (this.position()==iv.position());
    }
    return false;
  }

  /*******************************
  * Return a String representation
  * of the object
  ********************************/
  public String toString() {
    String ans=new String("[n0=");
    ans.concat(Integer.toString(n0));
    ans.concat("][k=");
    ans.concat(Integer.toString(k));
    ans.concat("]");
    return(ans);
  }
	/****************************************
  * This method is used to compute
  * how the number of scaling functions
  * changes from on scale to the other.
  * Basically, if you have k scaling
  * function and a Filter of type t, you'll
  * have 2*k+t scaling functions at the
  * next scale (dyadic case).
  * Notice that this method assumes
  * that one is working with the dyadic
  * grid while the method "previousDimension"
  * define in the interface "Filter" doesn't.
	******************************************/
	public int getFilterType () {
			return(cdf.filtretype);
	}
	public DualWavelet2_4 (int N0, int K) {
		setParameters(N0,K);
	}
	public DualWavelet2_4 () {
	}
  /**********************************************
  * Set the parameters for this object
  * @param N0 number of scaling function on the
  *   scale of this object
  * @param K position or number of this object
  * @exception IllegalScalingException if N0 is not
  *   large enough
  ***********************************************/
	public void setParameters(int N0, int K) {
		if(N0 

Ads help maintain this website.