8
9
% Copyright 2007, Timothy A. Davis, University of Florida
12
12
f = find (index.nrows == index.ncols) ;
13
13
[ignore i] = sort (index.nnz (f)) ;
19
Prob = UFget (f (k), index) ;
28
if (nnz (spones (AT) - spones (A)) == 0)
29
fprintf ('skip transpose\n') ;
37
[p1,q1,r1,work1] = btf (A) ;
39
n1 = length (r1) - 1 ;
42
[p2,q2,r2,work2] = btf (A, 10) ;
44
n2 = length (r2) - 1 ;
47
'%4d %4d : %10.4f %8d %8g : %10.4f %8d %8g : rel %8.4f %8.4f\n', ...
48
k, f(k), t1, n1, work1, t2, n2, work2, t1 ./ t2, n2 ./ (max (1, n1))) ;
50
if (n1 ~= n2 | work1 ~= work2) %#ok
52
fprintf ('^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n') ;
17
skip_costly = [1514 1297 1876 1301] ;
18
f = setdiff (f, skip_costly) ;
23
nmat = min (nmat, length (f)) ;
26
h = waitbar (0, 'BTF test 4 of 6') ;
31
Prob = UFget (f (k), index) ;
42
if (nnz (spones (AT) - spones (A)) == 0)
43
fprintf ('skip transpose\n') ;
51
[p1,q1,r1,work1] = btf (A) ;
53
n1 = length (r1) - 1 ;
56
[p2,q2,r2,work2] = btf (A, 10) ;
58
n2 = length (r2) - 1 ;
61
'%4d %4d : %10.4f %8d %8g : %10.4f %8d %8g :', ...
62
k, f(k), t1, n1, work1, t2, n2, work2) ;
64
fprintf (' rel %8.4f %8.4f' , t1 / t2, n2 / (max (1, n1))) ;
68
if (n1 ~= n2 | work1 ~= work2) %#ok
70
fprintf ('^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n') ;
77
% out-of-memory is OK, other errors are not
79
if (isempty (strfind (lasterr, 'Out of memory')))
80
error (lasterr) ; %#ok
82
fprintf ('test terminated early, but otherwise OK\n') ;