* This is one of the first releases of a completely rewritten interpreter engine. If you discover strange behaviors or unexpected results do not hesitate to [report](https://bugzilla.scilab.org) them.
* Toolboxes rebuild is in progress. Do not hesitate to submit patch or feature upgrade to the [development mailing list](dev@lists.scilab.org) for a particular toolbox.
+### Bugs fixed in 6.0.2:
+* [#7675](http://bugzilla.scilab.org/show_bug.cgi?id=7675): sparse() got a wrong result, when creation with many values in same position.
+
### Bugs fixed in 6.0.1:
* [#2441](http://bugzilla.scilab.org/show_bug.cgi?id=2441): `%onprompt()` could be defined only at the top execution level.
}
matrixCplx = new CplxSparse_t(rows, cols);
- matrixCplx->setFromTriplets(tripletList.begin(), tripletList.end(), DupFunctor<std::complex<double>>());
+ matrixCplx->setFromTriplets(tripletList.begin(), tripletList.end());
m_iRows = static_cast<int>(matrixCplx->rows());
m_iCols = static_cast<int>(matrixCplx->cols());
}
}
matrixReal = new RealSparse_t(rows, cols);
- matrixReal->setFromTriplets(tripletList.begin(), tripletList.end(), DupFunctor<double>());
+ matrixReal->setFromTriplets(tripletList.begin(), tripletList.end());
m_iRows = static_cast<int>(matrixReal->rows());
m_iCols = static_cast<int>(matrixReal->cols());
}
matrixBool = new BoolSparse_t(rows, cols);
- matrixBool->setFromTriplets(tripletList.begin(), tripletList.end(), DupFunctor<bool>());
+ matrixBool->setFromTriplets(tripletList.begin(), tripletList.end());
m_iRows = static_cast<int>(matrixBool->rows());
m_iCols = static_cast<int>(matrixBool->cols());
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2018 - ASI Group - Cedric Delamarre
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- CLI SHELL MODE -->
+// <-- NO CHECK REF -->
+//
+// <-- Non-regression test for bug 7675 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=7675
+//
+// <-- Short Description -->
+// sparse() got a wrong result, when creation with many values in same position
+
+assert_checkequal(sparse([1 1; 2 2; 1 1],[1 2 3]), sparse([1 1;2 2], [4 2]))