Code covered by the BSD License
-
cod (A, tol)
COD complete orthogonal decomposition of a full matrix A = U*R*V'
-
cod_qmult (Q, X, method)
-
cod_sparse (A, arg)
COD_SPARSE complete orthogonal decomposition of a sparse matrix A = U*R*V'
-
factorize (A,strategy,burble)
FACTORIZE an object-oriented method for solving linear systems
-
inverse (A, varargin)
INVERSE factorized representation of inv(A) or pinv(A).
-
reset_rand
RESET_RAND resets the state of rand
-
rq (A, m, n)
RQ economy RQ or QL factorization of a full matrix A.
-
test_accuracy
TEST_ACCURACY test the accuracy of the factorize object
-
test_all (performance)
TEST_ALL test the Factorize package (factorize, inverse, and related)
-
test_all_cod
TEST_ALL_COD test the COD factorization
-
test_all_svd
TEST_ALL_SVD tests the svd factorization method for a range of problems.
-
test_cod (A, tol)
TEST_COD test the COD, COD_SPARSE and RQ functions
-
test_disp
TEST_DISP test the display method of the factorize object
-
test_errors
TEST_ERRORS tests error handling for the factorize object methods
-
test_factorize (A)
TEST_FACTORIZE test the accuracy of the factorization object
-
test_function (A, strategy, b...
TEST_FUNCTION test various functions applied to a factorize object
-
test_functions
TEST_FUNCTIONS test various functions applied to a factorize object
-
test_performance
TEST_PERFORMANCE compare performance of factorization/solve methods.
-
test_svd (A)
-
factorization
FACTORIZATION a generic matrix factorization object
-
factorization_chol_dense
FACTORIZATION_CHOL_DENSE A = R'*R where A is full and symmetric pos. def.
-
factorization_chol_sparse
-
factorization_cod_dense
FACTORIZATION_COD_DENSE complete orthogonal factorization: A = U*R*V' where A is full.
-
factorization_cod_sparse
FACTORIZATION_COD_SPARSE complete orthogonal factorization: A = U*R*V' where A is sparse.
-
factorization_ldl_dense
FACTORIZATION_LDL_DENSE P'*A*P = L*D*L' where A is sparse and full
-
factorization_ldl_sparse
FACTORIZATION_LDL_SPARSE P'*A*P = L*D*L' where A is sparse and symmetric
-
factorization_lu_dense
FACTORIZATION_LU_DENSE P*A = L*U where A is square and full.
-
factorization_lu_sparse
FACTORIZATION_LU_SPARSE P*A*Q = L*U where A is square and sparse.
-
factorization_qr_dense
FACTORIZATION_QR_DENSE A = Q*R where A is full.
-
factorization_qr_sparse
-
factorization_qrt_dense
FACTORIZATION_QRT_DENSE A' = Q*R where A is full.
-
factorization_qrt_sparse
-
factorization_svd
FACTORIZATION_SVD A = U*S*V'
-
Contents.m
-
Contents.m
-
factorize_demo.m
-
fdemo.m
-
THE FACTORIZE OBJECT for solv...
-
View all files
from
Don't let that INV go past your eyes; to solve that system, FACTORIZE!
by Tim Davis
A simple-to-use object-oriented method for solving linear systems and least-squares problems.
|
| factorization_qr_dense |
classdef factorization_qr_dense < factorization
%FACTORIZATION_QR_DENSE A = Q*R where A is full.
% Copyright 2011, Timothy A. Davis, University of Florida.
methods
function F = factorization_qr_dense (A, fail_if_singular)
%FACTORIZATION_QR_DENSE : A = Q*R
[m n] = size (A) ;
if (m < n)
error ('FACTORIZE:wrongdim', 'QR(A) method requires m >= n.') ;
end
[f.Q f.R] = qr (A,0) ;
F.A_condest = cheap_condest (get_diag (f.R), fail_if_singular) ;
F.A = A ;
F.Factors = f ;
F.A_rank = n ;
F.kind = 'dense economy QR factorization: A = Q*R' ;
end
function x = mldivide_subclass (F,b)
%MLDIVIDE_SUBLCASS x = A\b using a dense economy QR factorization
% least-squares solution of an overdetermined problem
% x = R \ (Q' * b)
f = F.Factors ;
opU.UT = true ;
x = linsolve (f.R, f.Q' * full (b), opU) ;
end
function x = mrdivide_subclass (b,F)
%MRDIVIDE_SUBCLASS x = b/A using dense QR of A
% minimum 2-norm solution of a underdetermined problem
% x = (Q * (R' \ b'))' ;
f = F.Factors ;
opUT.UT = true ;
opUT.TRANSA = true ;
x = (f.Q * linsolve (f.R, full (b'), opUT))' ;
end
end
end
|
|
Contact us at files@mathworks.com