From: Peter V. <pet...@ya...> - 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<T>. 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<T> to vnl_matrix<T> (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. |