Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Bolsee <benoit.bolsee@online.be>2009-10-20 13:50:24 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2009-10-20 13:50:24 +0400
commitcf29a237230abd4547d4435d5a5ab4cdcd46b332 (patch)
tree87afe174904a65e5b82fe77d9d603f3cdf7d1b22 /extern/Eigen2/Eigen/src/Sparse/SparseMatrix.h
parent2c455098056b4d9ce17dede92adb620f0ab0f3c9 (diff)
Use Eigen2 2.0 head version rather then 2.0.6. It contains various bug fix.
Diffstat (limited to 'extern/Eigen2/Eigen/src/Sparse/SparseMatrix.h')
-rw-r--r--extern/Eigen2/Eigen/src/Sparse/SparseMatrix.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/extern/Eigen2/Eigen/src/Sparse/SparseMatrix.h b/extern/Eigen2/Eigen/src/Sparse/SparseMatrix.h
index 3f09596bc64..65c609686d2 100644
--- a/extern/Eigen2/Eigen/src/Sparse/SparseMatrix.h
+++ b/extern/Eigen2/Eigen/src/Sparse/SparseMatrix.h
@@ -259,19 +259,21 @@ class SparseMatrix
m_data.resize(k,0);
}
+ /** Resizes the matrix to a \a rows x \a cols matrix and initializes it to zero
+ * \sa resizeNonZeros(int), reserve(), setZero()
+ */
void resize(int rows, int cols)
{
-// std::cerr << this << " resize " << rows << "x" << cols << "\n";
const int outerSize = IsRowMajor ? rows : cols;
m_innerSize = IsRowMajor ? cols : rows;
m_data.clear();
- if (m_outerSize != outerSize)
+ if (m_outerSize != outerSize || m_outerSize==0)
{
delete[] m_outerIndex;
m_outerIndex = new int [outerSize+1];
m_outerSize = outerSize;
- memset(m_outerIndex, 0, (m_outerSize+1)*sizeof(int));
}
+ memset(m_outerIndex, 0, (m_outerSize+1)*sizeof(int));
}
void resizeNonZeros(int size)
{
@@ -442,6 +444,9 @@ class SparseMatrix<Scalar,_Flags>::InnerIterator
int m_id;
const int m_start;
const int m_end;
+
+ private:
+ InnerIterator& operator=(const InnerIterator&);
};
#endif // EIGEN_SPARSEMATRIX_H