fix umfpack for row-major

This commit is contained in:
Gael Guennebaud 2012-06-06 09:44:53 +02:00
parent 9d2b6dd71a
commit 84d20720b2

View File

@ -147,7 +147,7 @@ class UmfPackLU : internal::noncopyable
typedef Matrix<int, 1, MatrixType::ColsAtCompileTime> IntRowVectorType;
typedef Matrix<int, MatrixType::RowsAtCompileTime, 1> IntColVectorType;
typedef SparseMatrix<Scalar> LUMatrixType;
typedef SparseMatrix<Scalar,RowMajor,int> UmfpackMatrixType;
typedef SparseMatrix<Scalar,ColMajor,int> UmfpackMatrixType;
public:
@ -313,7 +313,7 @@ class UmfPackLU : internal::noncopyable
void grapInput(const MatrixType& mat)
{
m_copyMatrix.resize(mat.rows(), mat.cols());
if( ((MatrixType::Flags&RowMajorBit)==RowMajorBit) || sizeof(typename MatrixType::Index)!=sizeof(int) || !mat.isCompressed())
if( ((MatrixType::Flags&RowMajorBit)==RowMajorBit) || sizeof(typename MatrixType::Index)!=sizeof(int) || !mat.isCompressed() )
{
// non supported input -> copy
m_copyMatrix = mat;