mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 03:09:01 +08:00
Fixing bug #578. Thanks to Angelos <filiatra@gmail.com>
This commit is contained in:
parent
c3a6fa03a2
commit
9b33ab62da
@ -29,6 +29,7 @@ int QuickSplit(VectorV &row, VectorI &ind, int ncut)
|
||||
{
|
||||
typedef typename VectorV::RealScalar RealScalar;
|
||||
using std::swap;
|
||||
using std::abs;
|
||||
int mid;
|
||||
int n = row.size(); /* length of the vector */
|
||||
int first, last ;
|
||||
@ -40,9 +41,9 @@ int QuickSplit(VectorV &row, VectorI &ind, int ncut)
|
||||
|
||||
do {
|
||||
mid = first;
|
||||
RealScalar abskey = std::abs(row(mid));
|
||||
RealScalar abskey = abs(row(mid));
|
||||
for (int j = first + 1; j <= last; j++) {
|
||||
if ( std::abs(row(j)) > abskey) {
|
||||
if ( abs(row(j)) > abskey) {
|
||||
++mid;
|
||||
swap(row(mid), row(j));
|
||||
swap(ind(mid), ind(j));
|
||||
|
Loading…
x
Reference in New Issue
Block a user