Re: another quick question
lums <[email protected]> Tue, 2 Dec 2003 19:49:28 -0500
| Newsgroups | gmane.comp.lib.mtl.devel |
|---|---|
| Message-ID | <[email protected]> |
I think this example code should swap the two rows in constant time. Best Wishes, Andrew Lumsdaine On Dec 2, 2003, at 5:31 PM, Sven Olsen wrote: > If I am working with a matrix of type: > > typedef matrix< double, rectangle<>, array< compressed<> >, row_major > >::type Matrix; > > what is the easiest way to swap two of the rows? > > I.E., I want to do something like > Matrix A(4,4); > /*initialize A*/ > swap(A[0],A[1]); > > Thanks, > Sven > > _______________________________________________ > This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/ _______________________________________________ This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/