Fix perm*sparse return type and nesting, and add several sanity checks for perm*sparse

This commit is contained in:
Gael Guennebaud
2015-10-14 10:16:48 +02:00
parent 527fc4bc86
commit c0adf6e38d
3 changed files with 109 additions and 44 deletions

View File

@@ -1045,6 +1045,9 @@ EIGEN_DONT_INLINE SparseMatrix<Scalar,_Options,_Index>& SparseMatrix<Scalar,_Opt
const bool needToTranspose = (Flags & RowMajorBit) != (internal::evaluator<OtherDerived>::Flags & RowMajorBit);
if (needToTranspose)
{
#ifdef EIGEN_SPARSE_TRANSPOSED_COPY_PLUGIN
EIGEN_SPARSE_TRANSPOSED_COPY_PLUGIN
#endif
// two passes algorithm:
// 1 - compute the number of coeffs per dest inner vector
// 2 - do the actual copy/eval