mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Use != instead of < to check for emptiness of iterator range (fixes bug #664)
This commit is contained in:
parent
4a42843513
commit
b61facb08b
@ -941,7 +941,7 @@ void set_from_triplets(const InputIterator& begin, const InputIterator& end, Spa
|
|||||||
typedef typename SparseMatrixType::Scalar Scalar;
|
typedef typename SparseMatrixType::Scalar Scalar;
|
||||||
SparseMatrix<Scalar,IsRowMajor?ColMajor:RowMajor> trMat(mat.rows(),mat.cols());
|
SparseMatrix<Scalar,IsRowMajor?ColMajor:RowMajor> trMat(mat.rows(),mat.cols());
|
||||||
|
|
||||||
if(begin<end)
|
if(begin!=end)
|
||||||
{
|
{
|
||||||
// pass 1: count the nnz per inner-vector
|
// pass 1: count the nnz per inner-vector
|
||||||
VectorXi wi(trMat.outerSize());
|
VectorXi wi(trMat.outerSize());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user