~ubuntu-branches/ubuntu/natty/suitesparse/natty

« back to all changes in this revision

Viewing changes to KLU/MATLAB/old/pivgrowth.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
 
 
2
 
function growth = pivgrowth(A)
3
 
 
4
 
    [p,q,r,lnz,Info1] = klua (A) ;
5
 
    [l,u,off,pnum,rs,Info2] = kluf (A, p,q,r,lnz,Info1) ;
6
 
 
7
 
    A = rs(pnum, pnum) \ A(pnum,q) ;
8
 
    growth = ones(Info1(2), 1); 
9
 
    [m,n] = size(A) ;
10
 
    nblocks = Info1 (4) ;
11
 
    for i = 1:nblocks
12
 
        start = r (i) ;
13
 
        en = r (i+1) - 1 ; 
14
 
        for j = 0:en-start
15
 
            col = start + j ;
16
 
            growth(col);
17
 
            growth(col) = max(abs(A(start:en,col))) / max(abs(u(:,col))) ;
18
 
        end
19
 
    end
20
 
    growth = min(growth) ;
21
 
 
22