Re: [Lapackpp-devel] Error in LaGenMatDouble::copy(...) and other questions
Status: Beta
Brought to you by:
cstim
From: Dominik W. <dom...@ar...> - 2006-11-19 08:33:44
|
> You didn't send it to the mailing list, only to me directly. In the > future please make sure you always send a CC to the mailing list I'm sorry for that. Would be easier, if the mailing list would be standard and your mail as CC. ;) > Please always use the code from CVS, now that you're actually working > with it. I already did some changes. You see, this is the first "project" I working with where several other people are workig with. Sorry again. > As for inline vs. non-inline: I want to reduce the "inline" functions > to a minimum, because they contradict the OO-paradigm of "hiding the > implementation" (and make debugging harder, among other things). Hm, maybe I'm more mathematican than programmer. I've never heard of these "inline" before and have left these entries as they were before. I have read what "inline" stands for but I cannot decide where it useful, because I would never use it on my own. But I try to guess the correct usage. > If possible, please think about splitting the code to a .cc file so that > only the useful functions stay inline and the others are defined in the > .cc file. I can do this the next week. > Also, please think about adding a test program (in > matrix/test/blablabla.cc) so that the correct functioning can be tested > automatically. I will take a look at the other files in there. I doesn't have a clue what I should test. ;) > Actually I'm not so sure whether the function LaSymmBandMatFactorize() > is useful. If that functionality better lives inside some > LaSymmBandFactDouble class methods then I'd encourage you to remove the > function and move the code to suitable class methods. Me too. In my first changes I do not want to change too many things at once. But I haven't understood it either why not assigning / referencing a Matrix in the constructor and do the factorization with a class method. I will do this the next time. >> 2. What is the correct meaning of A.size(int d) ? > No, I think size() should give the dimensions in terms of the > "mathematical" viewpoint, not in terms of the internal storage Okay, I will change this. I hope it's okay, if I paste the other mail below for answering... > Are you subscribed to the lapackpp-cvs list? You should. I wilI! :) > Is sybmd.h really a *symmetric* banded matrix? Is this fact of symmetry > used anywhere inside this class? > Surely, in terms of optimized storage, > we would need to store only 1*p+1 instead of 2*p+1 elements... No and yes. ;) The memory space is not optimized for the same reason as LaSymmMatDouble uses the same memory as LaGenMatDouble. In each Lapack-function you can use the upper or lower part of a matrix to do the changes. Of course only one side is necessary in symmetric matrices but that is not interesting for lapack-functions. It must use the whole memory. Do you know how the memory is accessed by lapack or blas? Maybe we could change it. In other methods like copy or operator() the symmetry is used of course. > Seems to me the matrix class itself rather implements a general band matrix No. It is a banded matrix with same bandwith in subdiags and superdiags. :) So it's a type of special band matrix in terms of memory usage. But the class LaSymmBandMatDouble uses internally only half of the memory. I do not know much about Lapack storage but I think you could not and should not change it or Lapack-functions will fail. But I do not know it for sure. Again two other hints: 1. In laslv.h you forget to #include LA_VECTOR_DOUBLE_H You will get an error including this file without including lavd.h yourself before. 2. Last time you suggested Blas_R1_Update for C := A' * A. Unfortunately this function is broken or does not work that way. The reason is that the lapack-function inside will alway perform C := alpha*A*A' + beta*C because "trans" is set to 'N'. You have no chance to do C := A' * A. The same with Blas_R2_Update. You only perform C := alpha*A*B' + alpha*B*A' + beta*C but alpha*A'*B + alpha*B'*A + beta*C is not acessable. You should add some new parameter for these functions or create different function as you have done with Blas_Mat_Mat_Mult and Blas_Mat_Trans_Mat_Mult. Greetings, Dominik |