Covariance matrix than can be inverted using the Sherman-Morrison-Woodbury forumla. CSMW = CovarSMW(C,B) Create the covariance matrix CSMW = C + B*B' than can be inverted efficiently using the Sherman-Morrison-Woodbury formula, if size(B,2) is much smaller than size(C,1): inv(C + B*B') = inv(C) - inv(C)*B*inv(B'*inv(C)*B + I)*B'*inv(C) The symetric matrix C should implement the methods: size, diag, mtimes, mldivde and the matrix B should implement the methods: size, tranpose, mtimes, sum.
Package: divand