~ubuntu-branches/ubuntu/wily/octave-ltfat/wily-proposed

« back to all changes in this revision

Viewing changes to inst/private/test_wignervilledist.m

  • Committer: Package Import Robot
  • Author(s): Sébastien Villemot, Rafael Laboissiere
  • Date: 2015-07-18 23:36:41 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20150718233641-jhuf3f551a3523qc
Tags: 2.1.0+dfsg-1
* Team upload.

[ Rafael Laboissiere ]
* Imported Upstream version 2.1.0+dfsg
* d/rules: Prevent unit testing on armhf and mips.
  This avoids FTBFS on theses architectures (see Bug#765545).
* Unit testing does not need X-window anymore
  + d/rules: Do not use xfvb-run to run the tests.
  + d/control: Drop xauth, xvfb, and gnuplot-nox from Build-Depends.
    Also, the versioned dependency on octave-pkg-dev is relaxed.
* Drop .jar file from upstream tarball, complying with the Debian Policy
  + d/copyright: Exclude file blockproc.jar
  + d/rules: Add get-orig-source target
  + d/watch: Mangle upstream version to cope with "+dfsg" tag
* Build blockproc.jar, which is deleted from the upstream tarball
  + d/rules: Add commands for building blockproc.jar
  + d/control: Build-depend on default-jdk
  + d/p/fix-path-of-included-makefile.patch: New patch
* Bump Standard-Versions to 3.9.6 (no changes needed)
* d/p/autoload-yes.patch: Remove patch (deprecated upstream)
* Bump Build-Depends on octave to >> 4.0.0~rc4-1 (for sndfile support)
* d/check.m: Avoid verbose output of unit tests
* d/watch: Add the repacksuffix option
* d/p/add-hardening-flags.patch: Drop patch (applied upstream)
* d/p/fix-path-of-included-makefile.patch: Drop patch (applied upstream)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function test_failed = test_wignervilledist
 
2
Lr = [1, 19, 20];
 
3
 
 
4
test_failed = 0;
 
5
 
 
6
disp(' ===============  TEST_WIGERVILLEDIST ==============');
 
7
 
 
8
for ii = 1: length(Lr)
 
9
  L = Lr(ii);
 
10
    for n = 1:4
 
11
    
 
12
    if (n==1)
 
13
    type1 = 'auto';
 
14
    type2 = 'real';
 
15
    f = tester_rand(L,1);
 
16
    g = f;
 
17
    elseif (n==2)
 
18
    type1 = 'auto';
 
19
    type2 = 'complex';
 
20
    f = tester_crand(L,1);
 
21
    g = f;
 
22
    elseif (n==3)
 
23
    type1 = 'cross';
 
24
    type2 = 'real';
 
25
    f = tester_rand(L,1);
 
26
    g = tester_rand(L,1);
 
27
    elseif (n==4)
 
28
    type1 = 'cross';
 
29
    type2 = 'complex';
 
30
    f = tester_crand(L,1);
 
31
    g = tester_crand(L,1);
 
32
    end
 
33
  
 
34
    r1 = ref_wignervilledist(f,g);
 
35
    r2 = wignervilledist(f,g);
 
36
  
 
37
    res = norm(r1-r2);
 
38
  
 
39
    [test_failed, fail] = ltfatdiditfail(res, test_failed);
 
40
    s = sprintf('DWVD %3s %3s L:%3i %0.5g %s', type1, type2, L, res, fail);
 
41
    disp(s);
 
42
    end
 
43
end
 
44
end
 
45
 
 
46
%-*- texinfo -*-
 
47
%@deftypefn {Function} test_wignervilledist
 
48
%@verbatim
 
49
%@end verbatim
 
50
%@strong{Url}: @url{http://ltfat.github.io/doc/testing/test_wignervilledist.html}
 
51
%@end deftypefn
 
52
 
 
53
% Copyright (C) 2005-2015 Peter L. Soendergaard <peter@sonderport.dk>.
 
54
% This file is part of LTFAT version 2.1.0
 
55
%
 
56
% This program is free software: you can redistribute it and/or modify
 
57
% it under the terms of the GNU General Public License as published by
 
58
% the Free Software Foundation, either version 3 of the License, or
 
59
% (at your option) any later version.
 
60
%
 
61
% This program is distributed in the hope that it will be useful,
 
62
% but WITHOUT ANY WARRANTY; without even the implied warranty of
 
63
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
64
% GNU General Public License for more details.
 
65
%
 
66
% You should have received a copy of the GNU General Public License
 
67
% along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
68