[Lapackpp-devel] Latridiagatdouble
Status: Beta
Brought to you by:
cstim
From: Do bi <mrc...@ya...> - 2006-08-08 05:42:20
|
Hi. You briefly explained with enough code how to create a tridiagonal matrix on http://lapackpp.sourceforge.net/html/classLaTridiagMatDouble.html#_details which is LaVectorDouble newdiag(N); newdiag(0) = ...; LaTriagMatDouble triagmat(N); triagmat.diag(0).inject(newdiag); // correct // but don't write this: triagmat.diag(0) = newdiag; // wrong! and easily understood and very helpful. Can you please write a similar size of code to solve a tridiagonal matrix? Thanks Christian Stimming <sti...@tu...> wrote: Am Sonntag, 6. August 2006 13:25 schrieb Do bi: > If I use LaTridiagMatDouble instead of LaGenMatDouble, will I save memory? RTFM!!!!!!!!!!!! http://en.wikipedia.org/wiki/RTFM Everything explained in the header include/trmd.h > Moreover, if I use LaSymmTridiagMatDouble, will the new Lapackpp package > solve the system? There is no LaSymmTridiagMatDouble. Christian > > Christian Stimming wrote: Am Freitag, 4. August 2006 15:24 schrieb Do bi: > > I want to solve the tridiagonal Ax=b. If this is not possible, then I > > proceed with LaMatDouble because I have already produced a tridiagonal > > with my code in the form of a LaMatDouble. Thanks. > > > > Christian Stimming wrote: > > (...) Apart from this I actually don't quite understand what you > > want to do with the LaTridiagMat. There aren't any useful functions > > available for these, except for LaTridiagMatFactorize in trfd.h ... > > If you want to solve tridiagonal Ax=b then the two functions at the end of > include/trfd.h should be exactly what you need. You first create the > LaTridiagMatDouble A with your data, then create its factorization by > LaTridiagMatFactorize, then use that factorization to solve Ax=b by the > LaLinearSolve in trfd.h. In numerical maths it is quite usual to solve Ax=b > in these two separate steps. --------------------------------- Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail Beta. |