1
%test1: KLU test script
7
% Copyright 2004-2007 Timothy A. Davis, Univ. of Florida
8
% http://www.cise.ufl.edu/research/sparse
15
f = find (index.nrows == index.ncols & index.isReal) ;
16
[ignore i] = sort (index.nnz (f)) ;
23
% f = 101 ; % MATLAB condest is poor
27
conds_klu = ones (1,nmat) ;
28
conds_matlab = ones (1,nmat) ;
41
Prob = UFget (i,index) ;
45
% [L,U,p,q,R,F,r,info] = klu (A) ;
47
[LU, info, c2] = klu (A) ;
56
blocks = length (r) - 1 ;
61
err = norm (A*x-b,1) / norm (A,1) ;
64
rho = lu_normest (R\A(p,q) - F, L, U) ;
66
r2 = full (min (abs (diag (U))) / max (abs (diag (U)))) ;
74
conds_matlab (k) = c ;
81
'blocks %6d err %8.2e condest %8.2e %8.2e rcond %8.2e %8.2e err %8.2e\n', ...
82
blocks, rho, c2, c, r1, r2, err) ;
86
plot (1:k, log10 (conds_klu (1:k) ./ conds_matlab (1:k)), 'o') ;