transpose copy at end of cholesky_decomp

Brian Gough bjg@network-theory.co.uk
Tue Mar 28 12:14:00 GMT 2006


James Bergstra writes:
 > I am wondering, why does the routine gsl_linalg_cholesky_decomp(gsl_matrix*A)
 > include nested for loops at the end that transpose-copy the lower triangle of A
 > into the upper triangle of A?  
 > 
 > Could the library expose another routine in which the post-processing is at
 > least optional?
 > 
 > gsl_linalg_cholesky_decomp_lower(gsl_matrix*A) for example?

It's just for convenience and symmetry (saves having to mess around
with CBlasTrans if you want the upper triangular part, for example).

Cholesky is O(N^3) and the transpose is O(N^2) so it's not really
going to save any time.

-- 
Brian Gough



More information about the Gsl-discuss mailing list