Re: Diagonal matrix iterator
Peter Gottschling <[email protected]> Tue, 29 May 2007 15:29:13 -0400
| Newsgroups | gmane.comp.lib.mtl.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============1038686186== Content-Type: multipart/alternative; boundary=Apple-Mail-1-296290482 --Apple-Mail-1-296290482 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hi Tom, The best way I can think of is just writing a loop (over the rows). This is not very fancy but there are no special iterators for traversing the diagonal. Cheers, Peter On May 28, 2007, at 9:23 AM, Tom wrote: > Hi, > > What is the correct way to iterate over the diagonal elements of a > diagonal > matrix (single diagonal, no side bands)? Is there an easy way to > copy a vector > onto that diagonal? > > Cheers, > > Tom. > > _______________________________________________ > This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/ ------------ Peter Gottschling Research Associate Open Systems Laboratory Indiana University 135 Lindley Hall Bloomington, IN 47405 Tel.: +1 812 855-3608 Fax: +1 812 856 0853 http://www.osl.iu.edu/~pgottsch --Apple-Mail-1-296290482 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 <HTML><BODY style=3D"word-wrap: break-word; -khtml-nbsp-mode: space; = -khtml-line-break: after-white-space; ">Hi Tom,<DIV><BR = class=3D"khtml-block-placeholder"></DIV><DIV>The best way I can think of = is just writing a loop (over the rows).=A0 This is not very fancy but = there are no special iterators for traversing the = diagonal.</DIV><DIV><BR = class=3D"khtml-block-placeholder"></DIV><DIV>Cheers,</DIV><DIV>Peter</DIV>= <DIV><BR><DIV><DIV>On May 28, 2007, at 9:23 AM, Tom wrote:</DIV><BR = class=3D"Apple-interchange-newline"><BLOCKQUOTE type=3D"cite"><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">Hi,</DIV><DIV style=3D"margin-top: 0px; = margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: = 14px; "><BR></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; = margin-bottom: 0px; margin-left: 0px; ">What is the correct way to = iterate over the diagonal elements of a diagonal<SPAN = class=3D"Apple-converted-space">=A0</SPAN></DIV><DIV style=3D"margin-top: = 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">matrix = (single diagonal, no side bands)? Is there an easy way to copy a = vector<SPAN class=3D"Apple-converted-space">=A0</SPAN></DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">onto that diagonal?</DIV><DIV style=3D"margin-top: = 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; = min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: 0px; = margin-right: 0px; margin-bottom: 0px; margin-left: 0px; = ">Cheers,</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; = margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">Tom.<SPAN = class=3D"Apple-converted-space">=A0</SPAN></DIV><DIV style=3D"margin-top: = 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; = min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: 0px; = margin-right: 0px; margin-bottom: 0px; margin-left: 0px; = ">_______________________________________________</DIV><DIV = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px; ">This list is archived at <A = href=3D"http://www.osl.iu.edu/MailArchives/mtl-devel/">http://www.osl.iu.e= du/MailArchives/mtl-devel/</A></DIV> </BLOCKQUOTE></DIV><BR><DIV> <SPAN = class=3D"Apple-style-span" style=3D"border-collapse: separate; = border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; = font-size: 12px; font-style: normal; font-variant: normal; font-weight: = normal; letter-spacing: normal; line-height: normal; text-align: auto; = -khtml-text-decorations-in-effect: none; text-indent: 0px; = -apple-text-size-adjust: auto; text-transform: none; orphans: 2; = white-space: normal; widows: 2; word-spacing: 0px; "><SPAN = class=3D"Apple-style-span" style=3D"border-collapse: separate; = border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; = font-size: 12px; font-style: normal; font-variant: normal; font-weight: = normal; letter-spacing: normal; line-height: normal; text-align: auto; = -khtml-text-decorations-in-effect: none; text-indent: 0px; = -apple-text-size-adjust: auto; text-transform: none; orphans: 2; = white-space: normal; widows: 2; word-spacing: 0px; = "><DIV>------------</DIV><DIV>Peter Gottschling</DIV><DIV>Research = Associate</DIV><DIV>Open Systems Laboratory</DIV><DIV>Indiana = University</DIV><DIV>135=A0Lindley Hall</DIV><DIV>Bloomington, IN = 47405</DIV><DIV>Tel.: +1 812 855-3608=A0 =A0Fax: +1 812 856 = 0853</DIV><DIV><A = href=3D"http://www.osl.iu.edu/~pgottsch">http://www.osl.iu.edu/~pgottsch</= A></DIV><BR class=3D"Apple-interchange-newline"></SPAN></SPAN> = </DIV><BR></DIV></BODY></HTML>= --Apple-Mail-1-296290482-- --===============1038686186== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/ --===============1038686186==--