KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > JSci > maths > wavelet > Filter


1
2 package JSci.maths.wavelet;
3
4 /****************************************
5 * This interface is used to define wavelet filters.
6 * It is fairly general to accomodate just about any
7 * filter (except complex ones). Since changing
8 * an interface is painful, it must be as general
9 * as possible to start with. Therefore it doesn't
10 * assume that you are using dyadic wavelets (for
11 * example) and so, some object will implement
12 * somewhat redundant method that builds on the
13 * dyadic grid (for simplicity).
14 * @author Daniel Lemire
15 *****************************************/

16 public interface Filter {
17   /************************************
18   * lowpass filter
19   *************************************/

20     double[] lowpass (double[] x);
21
22     /****************************************
23     * Highpass filters are normalized
24   * in order to get L2 orthonormality of the
25   * resulting wavelets (when it applies).
26   * See the class DiscreteHilbertSpace for
27   * an implementation of the L2 integration.
28     *****************************************/

29     double[] highpass (double[] y);
30   /************************************
31   * lowpass filter
32   * @param param a parameter for the filter
33   *************************************/

34   double[] lowpass (double[] x, double[] param);
35
36     /****************************************
37     * Highpass filters are normalized
38   * in order to get L2 orthonormality of the
39   * resulting wavelets (when it applies).
40   * See the class DiscreteHilbertSpace for
41   * an implementation of the L2 integration.
42   * @param param a parameter for the filter
43     *****************************************/

44     double[] highpass (double[] y, double[] param);
45
46     /****************************************
47   * This method return the number of "scaling"
48   * functions at the previous scale given a
49   * number of scaling functions. The answer
50   * is always smaller than the provided value
51   * (about half since this is a dyadic
52   * implementation). This relates to the same idea
53   * as the "filter type".
54   * However this method is used in the context
55   * of signal processing for performance
56   * reasons.
57     *****************************************/

58     int previousDimension(int k);
59
60 }
61
Popular Tags