~ubuntu-branches/ubuntu/oneiric/suitesparse/oneiric

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Nick Ellery
  • Date: 2009-06-14 19:15:52 UTC
  • mfrom: (7.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090614191552-2hliya5q8n1quseu
Tags: 1:3.4.0-1ubuntu1
* Merge from debian unstable, remaining changes (LP: #387137):
  - debian/control:
    - demote libatlas-doc from recommends to suggests as it is not in main
    - drop recommends on doc-central as it is not in main

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
    disp (Prob) ;
19
19
    A = Prob.A ;
20
20
    if (~isreal (A))
21
 
        continue
 
21
        continue
22
22
    end
23
23
    B = A' ;
24
24
 
25
25
    C = cs_transpose (A) ;
26
26
    if (nnz (B-C) ~= 0)
27
 
        error ('!')
 
27
        error ('!')
28
28
    end
29
29
 
30
30
    [m n] = size (A) ;
31
31
    % if (m == n)
32
 
        x = rand (n,1) ;
33
 
        y = rand (m,1) ;
34
 
        z = y+A*x ;
35
 
        q = cs_gaxpy (A,x,y) ;
36
 
        err = norm (z-q,1) / norm (z,1) ;
37
 
        disp (err) ;
38
 
        if (err > 1e-14)
39
 
            error ('!')
40
 
        end
 
32
        x = rand (n,1) ;
 
33
        y = rand (m,1) ;
 
34
        z = y+A*x ;
 
35
        q = cs_gaxpy (A,x,y) ;
 
36
        err = norm (z-q,1) / norm (z,1) ;
 
37
        disp (err) ;
 
38
        if (err > 1e-14)
 
39
            error ('!')
 
40
        end
41
41
    % end
42
42
 
43
43
 
51
51
    % [i j x]
52
52
    F = cs_sparse2 (i,j,x) ;
53
53
    if (nnz (D-E) ~= 0)
54
 
        error ('!')
 
54
        error ('!')
55
55
    end
56
56
    if (nnz (F-E) ~= 0)
57
 
        error ('!')
 
57
        error ('!')
58
58
    end
59
59
 
60
60
    clear A B C D E F