<div class="gmail_quote">On Wed, Jun 15, 2011 at 19:35, Alexander Grayver <span dir="ltr">&lt;<a href="mailto:agrayver@gfz-potsdam.de">agrayver@gfz-potsdam.de</a>&gt;</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&#39;m going to use this product as a part
of the following expressions:<br><br>v&#39;*A&#39;*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&#39;*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&#39;*w</div><div><br></div><div>preprocess: B = A&#39;*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>