function f=alldlm(ldlt,mu1,s) % multiplication of a symmetric matrix in compressed diagonal storage mode % by a vector. The coefficient matrix have been factorized by a preceding % call to alldlf. % function f=alldlm(ldlt,mu1,s) % where ldlt and mu1 are row vectors and f and s are column vectors. % (c) 2010 Alain Hebert, Ecole Polytechnique de Montreal n=size(s,1) ; f=zeros(n,1) ; f(1)=ldlt(mu1(1))*s(1) ; i1=mu1(1)+1 ; for k=2:n i2=mu1(k) ; key1=i2-k ; zk=0.0 ; for l=i1-i2+k:k-1 zk=zk+ldlt(key1+l)*s(l) ; f(l)=f(l)+ldlt(key1+l)*s(k) ; end f(k)=zk+ldlt(key1+k)*s(k) ; i1=i2+1 ; end