comparison liboctave/CSparse.cc @ 9417:5d46c4a894e8

fix bugs in sparse reductions
author Jaroslav Hajek <highegg@gmail.com>
date Fri, 03 Jul 2009 12:21:12 +0200
parents dc07bc4157b8
children c6edba80dfae
comparison
equal deleted inserted replaced
9416:2cc47338e427 9417:5d46c4a894e8
7371 if ((rows() == 1 && dim == -1) || dim == 1) 7371 if ((rows() == 1 && dim == -1) || dim == 1)
7372 return transpose (). prod (0). transpose(); 7372 return transpose (). prod (0). transpose();
7373 else 7373 else
7374 { 7374 {
7375 SPARSE_REDUCTION_OP (SparseComplexMatrix, Complex, *=, 7375 SPARSE_REDUCTION_OP (SparseComplexMatrix, Complex, *=,
7376 (cidx(j+1) - cidx(j) < nc ? 0.0 : 1.0), 1.0); 7376 (cidx(j+1) - cidx(j) < nr ? 0.0 : 1.0), 1.0);
7377 } 7377 }
7378 } 7378 }
7379 7379
7380 SparseComplexMatrix 7380 SparseComplexMatrix
7381 SparseComplexMatrix::sum (int dim) const 7381 SparseComplexMatrix::sum (int dim) const