public WaveletTransform(WaveletInterface wavelet, int iteration)
		{
			_wavelet = wavelet;
			_iteration = iteration;
		}
		public virtual void set_wavelet(WaveletInterface _wavelet)
		{
			this._wavelet = _wavelet;
		}
Exemplo n.º 3
0
        }         // FastWaveletTransform

        //   * Constructor receiving a Wavelet object.
        //   *
        //   * @date 10.02.2010 08:10:42
        //   * @author Christian Scheiblich
        //   * @param wavelet
        //   *          object of type Wavelet; Haar02, Daub02, Coif06, ...
        public FastWaveletTransform(WaveletInterface wavelet, int iteration) : base(wavelet, iteration)
        {
        }         // FastWaveletTransform
		public WaveletTransform(WaveletInterface wavelet)
		{
			_wavelet = wavelet;
		}
        }         // WaveletPacketTransform

        //   * Constructor receiving a Wavelet object.
        //   *
        //   * @date 23.02.2010 13:44:05
        //   * @author Christian Scheiblich
        //   * @param wavelet
        //   *          object of type Wavelet; Haar02, Daub02, Coif06, ...
        public WaveletPacketTransform(WaveletInterface wavelet, int iteration) : base(wavelet, iteration)
        {
        }         // WaveletPacketTransform
Exemplo n.º 6
0
 //   * Constructor receiving a Wavelet object.
 //   *
 //   * @date 10.02.2010 08:10:42
 //   * @author Christian Scheiblich
 //   * @param wavelet
 //   *          object of type Wavelet; Haar02, Daub02, Coif06, ...
 public FastWaveletTransform(WaveletInterface wavelet) : base(wavelet)
 {
 }         // FastWaveletTransform
Exemplo n.º 7
0
 public WaveletTransform(WaveletInterface wavelet)
 {
     _wavelet = wavelet;
 }
Exemplo n.º 8
0
 //   * Constructor receiving a WaveletI object.
 //   *
 //   * @date 23 juin 2011 15:54:54
 //   * @author Pol Kennel
 //   * @param wavelet
 public DiscreteWaveletTransform(WaveletInterface wavelet) : base(wavelet)
 {
 }
		//   * Constructor receiving a WaveletI object.
		//   *
		//   * @date 23 juin 2011 15:54:54
		//   * @author Pol Kennel
		//   * @param wavelet
		public DiscreteWaveletTransform(WaveletInterface wavelet) : base(wavelet)
		{
		}
		//   * Constructor receiving a WaveletI object and a iteration level for forward reverse methods
		//   *
		//   * @date 23 juin 2011 15:54:54
		//   * @author Pol Kennel
		//   * @param wavelet
		public DiscreteWaveletTransform(WaveletInterface wavelet, int iteration) : base(wavelet, iteration)
		{
		}
		} // WaveletPacketTransform

		//   * Constructor receiving a Wavelet object.
		//   * 
		//   * @date 23.02.2010 13:44:05
		//   * @author Christian Scheiblich
		//   * @param wavelet
		//   *          object of type Wavelet; Haar02, Daub02, Coif06, ...
		public WaveletPacketTransform(WaveletInterface wavelet, int iteration) : base(wavelet, iteration)
		{
		} // WaveletPacketTransform
		//   * Constructor receiving a Wavelet object.
		//   * 
		//   * @date 23.02.2010 13:44:05
		//   * @author Christian Scheiblich
		//   * @param wavelet
		//   *          object of type Wavelet; Haar02, Daub02, Coif06, ...
		public WaveletPacketTransform(WaveletInterface wavelet) : base(wavelet)
		{
		} // WaveletPacketTransform
Exemplo n.º 13
0
        }         // JWave

        //   * Main method for doing little test runs for different transform types and
        //   * different wavelets without JUnit. Requesting the transform type and the
        //   * type of wavelet to be used else usage is printed.
        //   *
        //   * @date 23.02.2010 14:26:47
        //   * @author Christian Scheiblich
        //   * @param args
        //   *          [transformType] [waveletType]
        //
        public static void RunTests(string[] args)
        {
            string waveletTypeList = "Haar02, Lege02, Daub02, Lege04, Daub03, Lege06, Coif06, Daub04";

            if (args.Length < 2 || args.Length > 3)
            {
                System.Console.Error.WriteLine("usage: JWave [transformType] {waveletType} {noOfSteps}");
                System.Console.Error.WriteLine("");
                System.Console.Error.WriteLine("transformType: DFT, FWT, WPT, DWT");
                System.Console.Error.WriteLine("waveletType : " + waveletTypeList);
                System.Console.Error.WriteLine("noOfSteps : " + "no of steps forward and reverse; optional");
                return;
            }             // if args

            string           wType   = args[1];
            WaveletInterface wavelet = null;

            if (wType.Equals("haar02", StringComparison.InvariantCultureIgnoreCase))
            {
                wavelet = new Haar02();
            }
            else if (wType.Equals("lege02", StringComparison.InvariantCultureIgnoreCase))
            {
                wavelet = new Lege02();
            }
            else if (wType.Equals("daub04", StringComparison.InvariantCultureIgnoreCase))
            {
                wavelet = new Daub02();
            }
            else if (wType.Equals("lege04", StringComparison.InvariantCultureIgnoreCase))
            {
                wavelet = new Lege04();
            }
            else if (wType.Equals("daub06", StringComparison.InvariantCultureIgnoreCase))
            {
                wavelet = new Daub03();
            }
            else if (wType.Equals("lege06", StringComparison.InvariantCultureIgnoreCase))
            {
                wavelet = new Lege06();
            }
            else if (wType.Equals("coif06", StringComparison.InvariantCultureIgnoreCase))
            {
                wavelet = new Coif06();
            }
            else if (wType.Equals("daub08", StringComparison.InvariantCultureIgnoreCase))
            {
                wavelet = new Daub04();
            }
            else
            {
                System.Console.Error.WriteLine("usage: JWave [transformType] {waveletType}");
                System.Console.Error.WriteLine("");
                System.Console.Error.WriteLine("available wavelets are " + waveletTypeList);
                return;
            }             // if wType

            string             tType = args[0];
            TransformInterface bWave = null;

            if (tType.Equals("dft", StringComparison.InvariantCultureIgnoreCase))
            {
                bWave = new DiscreteFourierTransform();
            }
            else if (tType.Equals("fwt", StringComparison.InvariantCultureIgnoreCase))
            {
                bWave = new FastWaveletTransform(wavelet);
            }
            else if (tType.Equals("wpt", StringComparison.InvariantCultureIgnoreCase))
            {
                bWave = new WaveletPacketTransform(wavelet);
            }
            else if (tType.Equals("dwt", StringComparison.InvariantCultureIgnoreCase))
            {
                bWave = new DiscreteWaveletTransform(wavelet);
            }
            else
            {
                System.Console.Error.WriteLine("usage: JWave [transformType] {waveletType}");
                System.Console.Error.WriteLine("");
                System.Console.Error.WriteLine("available transforms are DFT, FWT, WPT, DFT");
                return;
            }             // if tType

            // instance of transform
            Transform t;

            if (args.Length > 2)
            {
                string argNoOfSteps = args[2];
                int    noOfSteps    = Convert.ToInt32(argNoOfSteps);

                t = new Transform(bWave, noOfSteps);                 // perform less steps than possible
            }
            else
            {
                t = new Transform(bWave);                 // perform all steps
            }

            double[] arrTime = { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 };

            Console.WriteLine("");
            Console.WriteLine("time domain:");
            for (int p = 0; p < arrTime.Length; p++)
            {
                Console.Write("{0,9:F6}", arrTime[p]);
            }
            Console.WriteLine("");

            double[] arrFreqOrHilb = t.forward(arrTime);             // 1-D forward transform

            if (bWave is DiscreteFourierTransform)
            {
                Console.WriteLine("frequency domain:");
            }
            else
            {
                Console.WriteLine("Hilbert domain:");
            }
            for (int p = 0; p < arrTime.Length; p++)
            {
                Console.Write("{0,9:F6}", arrFreqOrHilb[p]);
            }
            Console.WriteLine("");

            double[] arrReco = t.reverse(arrFreqOrHilb);             // 1-D reverse transform

            Console.WriteLine("reconstruction:");
            for (int p = 0; p < arrTime.Length; p++)
            {
                Console.Write("{0,9:F6}", arrReco[p]);
            }
            Console.WriteLine("");
        } // main
		//   * Constructor receiving a Wavelet object.
		//   * 
		//   * @date 10.02.2010 08:10:42
		//   * @author Christian Scheiblich
		//   * @param wavelet
		//   *          object of type Wavelet; Haar02, Daub02, Coif06, ...
		public FastWaveletTransform(WaveletInterface wavelet) : base(wavelet)
		{
		} // FastWaveletTransform
Exemplo n.º 15
0
 public WaveletTransform(WaveletInterface wavelet, int iteration)
 {
     _wavelet   = wavelet;
     _iteration = iteration;
 }
		} // FastWaveletTransform

		//   * Constructor receiving a Wavelet object.
		//   * 
		//   * @date 10.02.2010 08:10:42
		//   * @author Christian Scheiblich
		//   * @param wavelet
		//   *          object of type Wavelet; Haar02, Daub02, Coif06, ...
		public FastWaveletTransform(WaveletInterface wavelet, int iteration) : base(wavelet, iteration)
		{
		} // FastWaveletTransform
Exemplo n.º 17
0
 public virtual void set_wavelet(WaveletInterface _wavelet)
 {
     this._wavelet = _wavelet;
 }
Exemplo n.º 18
0
 //   * Constructor receiving a WaveletI object and a iteration level for forward reverse methods
 //   *
 //   * @date 23 juin 2011 15:54:54
 //   * @author Pol Kennel
 //   * @param wavelet
 public DiscreteWaveletTransform(WaveletInterface wavelet, int iteration) : base(wavelet, iteration)
 {
 }
 //   * Constructor receiving a Wavelet object.
 //   *
 //   * @date 23.02.2010 13:44:05
 //   * @author Christian Scheiblich
 //   * @param wavelet
 //   *          object of type Wavelet; Haar02, Daub02, Coif06, ...
 public WaveletPacketTransform(WaveletInterface wavelet) : base(wavelet)
 {
 }         // WaveletPacketTransform