Update Copyright years
[Math-GSL.git] / pod / Wavelet.pod
blob893770a4e1d644a98f5661fe596e8211b6d47824
1 %perlcode %{
4 @EXPORT_OK = qw/
5     gsl_wavelet_alloc 
6     gsl_wavelet_free 
7     gsl_wavelet_name 
8     gsl_wavelet_workspace_alloc 
9     gsl_wavelet_workspace_free 
10     gsl_wavelet_transform 
11     gsl_wavelet_transform_forward 
12     gsl_wavelet_transform_inverse 
13     $gsl_wavelet_daubechies
14     $gsl_wavelet_daubechies_centered
15     $gsl_wavelet_haar
16     $gsl_wavelet_haar_centered
17     $gsl_wavelet_bspline
18     $gsl_wavelet_bspline_centered
22 %EXPORT_TAGS = ( all => [ @EXPORT_OK ], );
24 =head1 NAME
26 Math::GSL::Wavelet - Wavelets (for 1-D real data)
28 =head1 SYNOPSIS
30     use Math::GSL::Wavelet qw/:all/;
32 =cut
34 =head1 DESCRIPTION
36 Here is a list of all the functions included in this module :
38 =over 1
40 =item C<gsl_wavelet_alloc($T, $k)> - This function allocates and initializes a wavelet object of type $T, where $T must be one of the constants below. The parameter $k selects the specific member of the wavelet family.
42 =item C<gsl_wavelet_free($w)> - This function frees the wavelet object $w. 
44 =item C<gsl_wavelet_name>
46 =item C<gsl_wavelet_workspace_alloc($n)> - This function allocates a workspace for the discrete wavelet transform. To perform a one-dimensional transform on $n elements, a workspace of size $n must be provided. For two-dimensional transforms of $n-by-$n matrices it is sufficient to allocate a workspace of size $n, since the transform operates on individual rows and columns.
48 =item C<gsl_wavelet_workspace_free($work)> - This function frees the allocated workspace work. 
50 =item C<gsl_wavelet_transform>
52 =item C<gsl_wavelet_transform_forward($w, $data, $stride, $n, $work)> - This functions compute in-place forward discrete wavelet transforms of length $n with stride $stride on the array $data. The length of the transform $n is restricted to powers of two. For the forward transform, the elements of the original array are replaced by the discrete wavelet transform f_i -> w_{j,k} in a packed triangular storage layout, where j is the index of the level j = 0 ... J-1 and k is the index of the coefficient within each level, k = 0 ... (2^j)-1. The total number of levels is J = \log_2(n). The output data has the following form,
54 =over
56 =item (s_{-1,0}, d_{0,0}, d_{1,0}, d_{1,1}, d_{2,0}, ...,
58 =item d_{j,k}, ..., d_{J-1,2^{J-1}-1})
60 =back
61      
62 where the first element is the smoothing coefficient s_{-1,0}, followed by the detail coefficients d_{j,k} for each level j. The backward transform inverts these coefficients to obtain the original data. These functions return a status of $GSL_SUCCESS upon successful completion. $GSL_EINVAL is returned if $n is not an integer power of 2 or if insufficient workspace is provided.
64 =item C<gsl_wavelet_transform_inverse>
66 =back
68 This module also contains the following constants with their valid k value for the gsl_wavelet_alloc function :
70 =over 1
72 =item $gsl_wavelet_daubechies
74 =item $gsl_wavelet_daubechies_centered
76 =back
78 This is the Daubechies wavelet family of maximum phase with k/2 vanishing moments. The implemented wavelets are k=4, 6, ..., 20, with k even.
80 =over 1
82 =item $gsl_wavelet_haar
84 =item $gsl_wavelet_haar_centered
86 =back
88 This is the Haar wavelet. The only valid choice of k for the Haar wavelet is k=2. 
90 =over 1
92 =item $gsl_wavelet_bspline
94 =item $gsl_wavelet_bspline_centered
96 =back
98 This is the biorthogonal B-spline wavelet family of order (i,j). The implemented values of k = 100*i + j are 103, 105, 202, 204, 206, 208, 301, 303, 305 307, 309.
100 =head1 AUTHORS
102 Jonathan Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>
104 =head1 COPYRIGHT AND LICENSE
106 Copyright (C) 2008-2009 Jonathan Leto and Thierry Moisan
108 This program is free software; you can redistribute it and/or modify it
109 under the same terms as Perl itself.
111 =cut