[Lapackpp-devel] Re: lapackpp and banded matrices (was: help lapackpp)
Status: Beta
Brought to you by:
cstim
From: Christian S. <sti...@tu...> - 2005-12-24 15:57:34
|
Hi, thanks for your feedback. In the future please write to the mailing list lapackpp-devel instead to individual developers. Am Dienstag, 20. Dezember 2005 21:34 schrieb ll...@21...: > I am new to lapack++ and I found this package is very good. I have > compared lapack++ with matlab in solving a 1000x1000 equaions and it > turns out that lapack++ do a great job. Thanks for your contribution. Nice to hear. > However, I have some questions in using lapack++. I have a test code > like > > LaGenMatDouble A(N,N); > LaBandMatDouble B(N,2,2); // for five-diagonal matrix > LaVectorDouble x(N), f(N); > > LaLinearSolve(A, x, f); > > The program shown above can be compiled without any problem. I have never used the banded matrices, so I cannot guarantee anything with them. You need to manually verify that the functions really do what they are supposed to do. I can only guarantee (or rather: try to guarantee) the correct functionality for the GenMat classes. > I just > wonder if I really need lapack (not lapack++) installed. I have not > linked the library of lapack and blas and the program can also be run > and get the correct answer??? Well, if it works, then you can just be happy. I wouldn't bother as long as it works. > I am using lapack++ 2.4.2, windows If you're using the self-installing setup.exe file, then this comes with a DLL of blas and lapack, too. > Another question is about band matrix, I try to build a five-diagonal > matrix with LaBandMatDouble. In my case, building a band matrix with > LaBandMatDouble is ok, but it seems that LaLinearSolve has no > corresponding interface for solving LaBandMatDouble!? How can I solve a > band matrix with lapack++? As I said: the banded matrices have been untouched since the original lapack++-1.0. If you really need this functionality, then: 1. find out the original LAPACK function call that does what you want, 2. see whether there is already a declaration of that function call in include/lapackd.h, 3. if there is, then you're almost done: Go into src/linslv.cc and copy&paste the program code from one of the other functions, e.g. LaLULinearSolve(LaGenMatDouble& A, LaGenMatDouble& X, const LaGenMatDouble& B ), but replace the matrix types and the F77NAME function call with your appropriate names. Then add the declaration to the include/laslv.h header, compile and test your new function. If the tests behave as expected, send your program code to me and I'll happily add it to the library in CVS. Christian |