Algorithm 930: FACTORIZE: An Object-Oriented Linear System Solver for MATLAB

被引:27
作者
Davis, Timothy A. [1 ]
机构
[1] Univ Florida, Dept Comp & Informat Sci & Engn, Gainesville, FL 32610 USA
来源
ACM TRANSACTIONS ON MATHEMATICAL SOFTWARE | 2013年 / 39卷 / 04期
基金
美国国家科学基金会;
关键词
Algorithms; Experimentation; Performance; Linear systems; least-square problems; matrix factorization; object-oriented methods;
D O I
10.1145/2491491.2491498
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
The MATLAB (TM) backslash (x=A\b) is an elegant and powerful interface to a suite of high-performance factorization methods for the direct solution of the linear system Ax = b and the least-squares problem min(x) parallel to b - Ax parallel to. It is a meta-algorithm that selects the best factorization method for a particular matrix, whether sparse or dense. However, the simplicity and elegance of its single-character interface prohibits the reuse of its factorization for subsequent systems. Requiring MATLAB users to find the best factorization method on their own can lead to suboptimal choices; even MATLAB experts can make the wrong choice. Furthermore, naive MATLAB users have a tendency to translate mathematical expressions from linear algebra directly into MATLAB, so that x = A(-1)b becomes the inferior yet all-to-prevalent x=inv(A)*b. To address these issues, an object-oriented FACTORIZE method is presented. Via simple-to-use operator overloading, solving two linear systems can be written as F=factorize(A); x=F\b; y=F\c, where A is factorized only once. The selection of the best factorization method (LU, Cholesky, LDLT, QR, or a complete orthogonal decomposition for rank-deficient matrices) is hidden from the user. The mathematical expression x = A(-1)b directly translates into the MATLAB expression x=inverse(A)*b, which does not compute the inverse at all, but does the right thing by factorizing A and solving the corresponding triangular systems.
引用
收藏
页数:18
相关论文
共 21 条
[1]   Algorithm 837: AMD, an approximate minimum degree ordering algorithm [J].
Amestoy, PR ;
Enseeiht-Irit ;
Davis, TA ;
Duff, IS .
ACM TRANSACTIONS ON MATHEMATICAL SOFTWARE, 2004, 30 (03) :381-388
[2]   An approximate minimum degree ordering algorithm [J].
Amestoy, PR ;
Davis, TA ;
Duff, IS .
SIAM JOURNAL ON MATRIX ANALYSIS AND APPLICATIONS, 1996, 17 (04) :886-905
[3]  
ANDERSON E., 1999, LAPACK USERSGUIDE, V3rd
[4]  
[Anonymous], ACM T MATH SOFTW
[5]  
[Anonymous], MATLAB PRIMER
[6]   Algorithm 887: CHOLMOD, Supernodal Sparse Cholesky Factorization and Update/Downdate [J].
Chen, Yanqing ;
Davis, Timothy A. ;
Hager, William W. ;
Rajamanickam, Sivasankaran .
ACM TRANSACTIONS ON MATHEMATICAL SOFTWARE, 2008, 35 (03)
[7]  
Davis T. A., 2006, DIRECT METHODS SPARS
[8]   Algorithm 832: UMFPACK V4.3 - An unsymmetric-pattern multifrontal method [J].
Davis, TA .
ACM TRANSACTIONS ON MATHEMATICAL SOFTWARE, 2004, 30 (02) :196-199
[9]   A column approximate minimum degree ordering algorithm [J].
Davis, TA ;
Gilbert, JR ;
Larimore, SI ;
Ng, EG .
ACM TRANSACTIONS ON MATHEMATICAL SOFTWARE, 2004, 30 (03) :353-376
[10]  
Davis TA, 2004, ACM T MATH SOFTWARE, V30, P377, DOI 10.1145/1024074.1024080