<div class="gmail_quote">On Wed, Jun 15, 2011 at 19:35, Alexander Grayver <span dir="ltr"><<a href="mailto:agrayver@gfz-potsdam.de">agrayver@gfz-potsdam.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="font:10pt arial,helvetica,sans-serif">Actually, I'm going to use this product as a part
of the following expressions:<br><br>v'*A'*A*v</div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="font:10pt arial,helvetica,sans-serif">
A'*A*v<br></div></blockquote><div><br></div><div>Two choices here</div><div><br></div><div>w = A*v</div><div>result1 = norm(w)</div><div>result2 = A'*w</div><div><br></div><div>preprocess: B = A'*A</div><div>w = B*v</div>
<div>result1 = dot(v,w)</div><div>result2 = w</div><div><br></div><div><br></div><div>Note that B will require a bit more storage it is less sparse. It is probably problem-dependent which of these is faster.</div></div>