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

« back to all changes in this revision

Viewing changes to CHOLMOD/MATLAB/Test/test18.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 test18
2
 
% test18: test cholmod on a few large matrices
 
2
%TEST18 test cholmod2 on a few large matrices
 
3
% Example:
 
4
%   test18
 
5
% See also cholmod_test
 
6
 
 
7
% Copyright 2006-2007, Timothy A. Davis, University of Florida
 
8
 
3
9
fprintf ('=================================================================\n');
4
 
fprintf ('test18: test cholmod on a few large matrices\n') ;
 
10
fprintf ('test18: test cholmod2 on a few large matrices\n') ;
5
11
 
6
12
rand ('state',1) ;
7
13
randn ('state',1) ;
8
14
 
9
 
Prob = UFget (887)
10
 
A = Prob.A ;
11
 
n = size (A,1) ;
12
 
b = rand (n,1) ;
13
 
x = cholmod (A,b) ;
14
 
norm (A*x-b,1)
15
 
 
16
 
clear all
17
 
 
18
 
Prob = UFget (936)
19
 
A = Prob.A ;
20
 
n = size (A,1) ;
21
 
b = rand (n,1) ;
22
 
x = cholmod (A,b) ;
23
 
norm (A*x-b,1)
24
 
 
25
 
clear all
26
 
 
27
 
Prob = UFget (887)
28
 
A = Prob.A ;
29
 
n = size (A,1) ;
30
 
b = rand (n,1) ;
31
 
x = cholmod (A,b) ;
 
15
Prob = UFget (887)                                                          %#ok
 
16
A = Prob.A ;
 
17
n = size (A,1) ;
 
18
b = rand (n,1) ;
 
19
x = cholmod2 (A,b) ;
 
20
norm (A*x-b,1)
 
21
 
 
22
clear all
 
23
 
 
24
Prob = UFget (936)                                                          %#ok
 
25
A = Prob.A ;
 
26
n = size (A,1) ;
 
27
b = rand (n,1) ;
 
28
x = cholmod2 (A,b) ;
 
29
norm (A*x-b,1)
 
30
 
 
31
clear all
 
32
 
 
33
Prob = UFget (887)                                                          %#ok
 
34
A = Prob.A ;
 
35
n = size (A,1) ;
 
36
b = rand (n,1) ;
 
37
x = cholmod2 (A,b) ;
32
38
norm (A*x-b,1)
33
39
 
34
40
fprintf ('test18 passed\n') ;