# Just Launched: You can now import projects and releases from Google Code onto SourceForge

We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps.

## Re: [Vxl-users] Adjoint of sparse matrix?

 Re: [Vxl-users] Adjoint of sparse matrix? From: Peter Vanroose - 2011-03-11 17:28:53 Attachments: Message as HTML ```David, I looked at your suggestion; The adjoint which is present in SparseMatrix of Eigen is actually the "conjugate transpose" or "hermitian transpose" of the matrix, not the "adjugate" in the sense of the "cofactors" matrix. So this seems like a terminology misunderstanding here. For large matrices it is more likely that what is needed is the conjugate transpose; see e.g. the conjugate_transpose() method of vnl_matrix. This can indeed be easily added to vnl_sparse_matrix, together with a transpose() method. -- Peter. Eigen has an .adjoint() function on its SparseMatrix class (in SparseMatrixBase) http://eigen.tuxfamily.org/dox/classEigen_1_1SparseMatrix-members.html It may be worth looking at what they do. David ```

 Re: [Vxl-users] Adjoint of sparse matrix? From: Peter Vanroose - 2011-03-08 16:08:57 ```> Is there an adjoint function for vnl_sparse_matrix ? No, not (yet); could indeed be useful and nice to have, and not too difficult too implement. But beware that the adjoint of a sparse matrix will typically be non-sparse. (And will take ages to compute if matrix dimensions are large.) So the "adjoint" function, even with argument "sparse matrix", should probably best return a "normal" vnl_matrix. Which, in case of large matrix dimensions, could be "too large", of course. The easiest way to implement this, would be to just write out a conversion function from vnl_sparse_matrix to vnl_matrix (possibly as an operator in the vnl_sparse_matrix class) and then just call the already existing vnl_adjugate function. Only in the "too large" cases, also this conversion would be too slow and require a too large output object. If not, the conversion part of this story would be just a minor fraction of the total work. (At least, in the current implementation of vnl_adjugate). -- Peter. ```
 Re: [Vxl-users] Adjoint of sparse matrix? From: David Doria - 2011-03-08 20:44:03 Attachments: Message as HTML ```On Tue, Mar 8, 2011 at 11:08 AM, Peter Vanroose wrote: > > Is there an adjoint function for vnl_sparse_matrix ? > > > No, not (yet); could indeed be useful and nice to have, and not too > difficult too implement. > > But beware that the adjoint of a sparse matrix will typically be > non-sparse. (And will take ages to compute if matrix dimensions are large.) > So the "adjoint" function, even with argument "sparse matrix", should > probably best return a "normal" vnl_matrix. > Which, in case of large matrix dimensions, could be "too large", of course. > > The easiest way to implement this, would be to just write out a conversion > function from vnl_sparse_matrix to vnl_matrix (possibly as an operator > in the vnl_sparse_matrix class) and then just call the already existing > vnl_adjugate function. > Only in the "too large" cases, also this conversion would be too slow and > require a too large output object. If not, the conversion part of this story > would be just a minor fraction of the total work. (At least, in the current > implementation of vnl_adjugate). > > -- Peter. > Eigen has an .adjoint() function on its SparseMatrix class (in SparseMatrixBase) - http://eigen.tuxfamily.org/dox/classEigen_1_1SparseMatrix-members.html It may be worth looking at what they do. David ```
 Re: [Vxl-users] Adjoint of sparse matrix? From: Peter Vanroose - 2011-03-11 17:28:53 Attachments: Message as HTML ```David, I looked at your suggestion; The adjoint which is present in SparseMatrix of Eigen is actually the "conjugate transpose" or "hermitian transpose" of the matrix, not the "adjugate" in the sense of the "cofactors" matrix. So this seems like a terminology misunderstanding here. For large matrices it is more likely that what is needed is the conjugate transpose; see e.g. the conjugate_transpose() method of vnl_matrix. This can indeed be easily added to vnl_sparse_matrix, together with a transpose() method. -- Peter. Eigen has an .adjoint() function on its SparseMatrix class (in SparseMatrixBase) http://eigen.tuxfamily.org/dox/classEigen_1_1SparseMatrix-members.html It may be worth looking at what they do. David ```