bug #910: add a StandardCompressedFormat option to Ref<SparseMatrix> to enforce standard compressed storage format.

If the input is not compressed, then this trigger a copy for a const Ref, and a runtime assert for non-const Ref.
This commit is contained in:
Gael Guennebaud
2015-06-09 23:11:24 +02:00
parent f899aeb301
commit feaf76c001
3 changed files with 50 additions and 1 deletions

View File

@@ -725,6 +725,9 @@ class SparseMatrix
}
else if(this!=&other)
{
#ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN
EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN
#endif
initAssignment(other);
if(other.isCompressed())
{