All Downloads are FREE. Search and download functionalities are using the official Maven repository.

JSci.maths.wavelet.daubechies5.Scaling5 Maven / Gradle / Ivy

Go to download

JSci is a set of open source Java packages. The aim is to encapsulate scientific methods/principles in the most natural way possible. As such they should greatly aid the development of scientific based software. It offers: abstract math interfaces, linear algebra (support for various matrix and vector types), statistics (including probability distributions), wavelets, newtonian mechanics, chart/graph components (AWT and Swing), MathML DOM implementation, ... Note: some packages, like javax.comm, for the astro and instruments package aren't listed as dependencies (not available).

The newest version!

package JSci.maths.wavelet.daubechies5;

import JSci.maths.wavelet.*;
/******************************************
* Daubechies wavelets adapted to the
* interval by Meyer. Thanks to Pierre Vial
* for the filters.
* @author Daniel Lemire
*****************************************/
public final class Scaling5 extends MultiscaleFunction  implements Cloneable {
	private int n0;
	private int k;
	private static final Daubechies5 cdf=new Daubechies5();
	public Scaling5 (int N0, int K) {
		setParameters(N0,K);
	}
  /*****************************************
  * Check if another object is equal to this
  * Scaling5 object
  ******************************************/
  public boolean equals(Object a) {
    if((a!=null) && (a instanceof Scaling5))  {
      Scaling5 iv=(Scaling5)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);
  }
  
 	public Scaling5 () {
	}
	/****************************************
  * 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);
	}
  /**********************************************
  * 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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy