KickJava   Java API By Example, From Geeks To Geeks.

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


1
2
3 package JSci.maths.wavelet;
4
5 /************************************
6 * This class is used to encapsulate
7 * the various wavelet multiresolution
8 * (Dau2, Haar, ...). It assumes that
9 * your are working with the dyadic case
10 * and with real numbers.
11 * It is meant to provide only the
12 * most basic methods in order to be
13 * as general as possible. Also,
14 * for performance considerations,
15 * this class should be as light as
16 * possible. However, in practice, it
17 * is useful to put most of the actual
18 * implementation in a multiresolution
19 * object instead of spreading it over
20 * many objects.
21 * @author Daniel Lemire
22 ************************************/

23 public abstract class Multiresolution extends Object JavaDoc {
24     /****************************************
25   * This method is used to compute
26   * how the number of scaling functions
27   * changes from on scale to the other.
28   * Basically, if you have k scaling
29   * function and a Filter of type t, you'll
30   * have 2*k+t scaling functions at the
31   * next scale (dyadic case).
32   * Notice that this method assumes
33   * that one is working with the dyadic
34   * grid while the method "previousDimension"
35   * define in the interface "Filter" doesn't.
36     ******************************************/

37     public abstract int getFilterType ();
38
39     public abstract MultiscaleFunction primaryScaling(int n0, int k);
40
41     public abstract MultiscaleFunction dualScaling(int n0, int k);
42
43     public abstract MultiscaleFunction primaryWavelet(int n0, int k);
44
45     public abstract MultiscaleFunction dualWavelet(int n0, int k);
46
47     /****************************************
48   * This method return the number of "scaling"
49   * functions at the previous scale given a
50   * number of scaling functions. The answer
51   * is always smaller than the provided value
52   * (about half since this is a dyadic
53   * implementation). This relates to the same idea
54   * as the "Filter type". It is used by
55   * the interface "Filter".
56   * If needed it should be
57     * overwritten, in particular, for
58     * performance considerations.
59     **************************************/

60     public int previousDimension (int k) {
61         return(Cascades.previousDimension(getFilterType(),k));
62     }
63
64 }
65
Popular Tags