183 double* matr_row_max;
185 if (larger < 0 || larger > _nrrows || smaller < 0 || smaller > _nrrows )
188 std::cout <<
"EmcLSSMatrix::ERROR"
189 <<
"!!! ERROR in bound check of EmcLSSMatrix !!!"
190 <<
"!!! Return zero !!!"
197 col_p = (_columns + (larger * _nrcol));
198 row_p = (_rows + (larger * _nrcol));
199 matr_p = (_matrix + (larger * _nrcol));
200 matr_row_max = (matr_p + _nrcol);
202 while ( matr_p < matr_row_max ) {
205 std::cout <<
"EmcLSSMatrix::VERBOSE"
206 <<
"C: " << larger <<
" " << smaller <<
" "
207 << col_p <<
" " << *col_p <<
" "
208 << matr_p <<
" " << *matr_p <<
" "
209 << (_matrix+(matr_p-_matrix)) <<
" "
210 << *(_matrix+(matr_p-_matrix)) << endl;
219 if ( matr_p == (matr_row_max-1) )
222 std::cout <<
"EmcLSSMatrix::WARNING "
223 <<
"!! WARNING: Reached maximum number of columns "
224 <<
"in LSSMatrix when searching for row "
225 << larger <<
" column " << smaller <<
" !!"
227 <<
"!! Return zero pointer !! " << endl;
234 if ( *col_p == smaller )
240 if ( (*matr_p == 0.) )
262 long int diff = matr_p-_matrix;
384 bool successful =
true;
389 long int _newIndx = 0;
392 for (
long int _arrayIndx = 0;
393 _arrayIndx < _size; _arrayIndx++)
399 if ( _matrix[_arrayIndx] > 0. )
402 if ( (xRef_list[(_rows[_arrayIndx])]) >= 0
403 && (xRef_list[(_columns[_arrayIndx])]) >= 0 )
405 _matrix[_newIndx] = _matrix[_arrayIndx];
406 _rows[_newIndx] = ((xRef_list[(_rows[_arrayIndx])])+1);
407 _columns[_newIndx] = ((xRef_list[(_columns[_arrayIndx])])+1);
414 if (xRef_list[(_rows[_arrayIndx])] < 0 )
417 std::cout <<
"EmcLSSMatrix::ERROR "
418 <<
"EmcLSSMatrix: Xtal index "
420 <<
" appears in matrix, "
421 <<
"but not in vector !!! "
422 << _rows[_arrayIndx] <<
" "
423 << _columns[_arrayIndx]
431 std::cout <<
"EmcLSSMatrix::ERROR "
432 <<
"EmcLSSMatrix: Xtal index "
433 << _columns[_arrayIndx]
434 <<
" appears in matrix, "
435 <<
"but not in vector !!! "
436 << _rows[_arrayIndx] <<
" "
437 << _columns[_arrayIndx]
449 std::cout <<
"EmcLSSMatrix::DEBUG "
450 <<
"Reduced LSSMatrix !!! Number of non zeros: "