From: Jacob \(Jack\) G. <jg...@cs...> - 2005-03-24 21:19:07
|
> -----Original Message----- > Err... No. The *Fact* classes are mentioned in the "Lapack++ 1.0 User > Guide", but that's about it. Strange, I did a google on LaSpdFactDouble and LaSymmBandFactDouble It turned up 0 results. > > > As it stands, I don't really see anything to convert from a symmetric > > LaGenMatDouble to a LaSymmBandMatDouble or vice versa. > > A general conversion doesn't make sense, does it? I guess you mean if > and only if a general matrix happens to be a symmetric matrix, then you > would like to be able to convert it to the LaSymmBandMatDouble? But > "Band" also refers to a banded matrix, doesn't it? In that case, the > internal storage structure is probably totally different anyways, so you > have to make an element-wise copy. In theory some function for this > could be added to Lapackpp, yes. Well, basically, I multiply a few LaGenMatDouble matrices together, and by construction the result is a Symmetric, Positive Definite matrix. Now, this matrix, I need to do a Cholesky factorization on. Just to test, I created a function in linslv.cc / laslv.h called void LaMatFactorize(const LaGenMatDouble &A,LaGenMatDouble& AF) based on the function in spdfd.h, but used it with a LaGenMatDouble as input. The result seems to be 'almost' correct. The function will only look at the upper triangle portion of the input matrix (it assumes symmetry), and the result is to be an upper-triangular matrix. The upper triangular portion of the resulting matrix is correct and does compare to the results obtained in matlab. The bottom triangle needs to be zeroed out. So, as a result, I have a working function, the problem is, if I manually zero out the bottom triangle, it may not be as optimal as lapack was intended to be. My questions now would be a) Is there a quick way of doing this zero-out? b) Should I submit this as a patch? c) If (b), is it ok in linslv.cc/laslv.h, or better elsewhere? Jack |