~logan/ubuntu/trusty/suitesparse/4.2.1-3ubuntu1

« back to all changes in this revision

Viewing changes to CHOLMOD/MATLAB/Test/test1.m

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2007-05-29 09:36:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070529093629-zowquo0b7slkk6nc
Tags: 3.0.0-2
* suitesparse builds properly twice in a row
* Bug fix: "suitesparse - FTBFS: Broken build depens: libgfortran1-dev",
  thanks to Bastian Blank (Closes: #426349).
* Bug fix: "suitesparse_3.0.0-1: FTBFS: build-depends on
  libgfortran1-dev", thanks to Steve Langasek (Closes: #426354).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
function test1 (wait)
2
 
% test1: test sparse2
 
2
%TEST1 test sparse2
 
3
% Example:
 
4
%   test1
 
5
% See also cholmod_test
 
6
 
 
7
% Copyright 2006-2007, Timothy A. Davis, University of Florida
 
8
 
3
9
fprintf ('=================================================================\n');
4
10
fprintf ('test1: test sparse2\n') ;
5
11
 
19
25
        for ks = 1:length (ss)
20
26
 
21
27
            fprintf ('\n-----------------------------------------------\n') ;
22
 
            i = ii {ki}
23
 
            j = jj {kj}
24
 
            s = ss {ks}
25
 
            m
26
 
            n
 
28
            i = ii {ki}     %#ok
 
29
            j = jj {kj}     %#ok
 
30
            s = ss {ks}     %#ok
 
31
            m               %#ok
 
32
            n               %#ok
27
33
            clear A1 A2 B1 B2
28
34
 
29
35
            fprintf ('\nA1 = sparse (i,j,s,m,n)\n') ;
30
36
            try % sparse, possibly with invalid inputs
31
 
                A1 = sparse (i,j,s,m,n)
 
37
                A1 = sparse (i,j,s,m,n)                     %#ok
32
38
                fprintf ('size A1: %d %d\n', size (A1)) ;
33
39
            catch
 
40
                A1 = 'A failed' ;
34
41
                fprintf ('sparse failed\n') ;
35
42
            end
36
43
 
37
44
            fprintf ('\nA2 = sparse2 (i,j,s,m,n)\n') ;
38
45
            try % sparse2, possibly with invalid inputs
39
 
                A2 = sparse2 (i,j,s,m,n)
 
46
                A2 = sparse2 (i,j,s,m,n)                        %#ok
40
47
                fprintf ('size A2: %d %d\n', size (A2)) ;
41
48
            catch
 
49
                A2 = 'A failed' ;
42
50
                fprintf ('sparse2 failed\n') ;
43
51
            end
44
52
 
45
53
            fprintf ('\nB1 = sparse (i,j,s)\n') ;
46
54
            try % sparse, possibly with invalid inputs
47
 
                B1 = sparse (i,j,s)
 
55
                B1 = sparse (i,j,s)                     %#ok
48
56
                fprintf ('size B1: %d %d\n', size (B1)) ;
49
57
            catch
 
58
                B1 = 'B failed' ;
50
59
                fprintf ('sparse failed\n') ;
51
60
            end
52
61
 
53
62
            fprintf ('\nB2 = sparse2 (i,j,s)\n') ;
54
63
            try % sparse2, possibly with invalid inputs
55
 
                B2 = sparse2 (i,j,s)
 
64
                B2 = sparse2 (i,j,s)                        %#ok
56
65
                fprintf ('size B2: %d %d\n', size (B2)) ;
57
66
            catch
 
67
                B2 = 'B failed' ;
58
68
                fprintf ('sparse2 failed\n') ;
59
69
            end
60
70
 
62
72
                pause
63
73
            end
64
74
 
 
75
            if (~isequal (A1,A2) | ~isequal (B1,B2))                        %#ok
 
76
                fprintf (...
 
77
                '========================== SPARSE AND SPARSE2 DIFFER\n') ;
 
78
            end
 
79
 
65
80
        end
66
81
    end
67
82
end