major bug with set fixed

This commit is contained in:
vasiloglou
2008-01-24 18:25:08 +00:00
parent 6adc077a9a
commit 33d58a6035
+1 -1
View File
@@ -312,7 +312,7 @@ double SparseMatrix::get(index_t r, index_t c) const {
void SparseMatrix::set(index_t r, index_t c, double v) {
DEBUG_BOUNDS(r, num_of_rows_);
DEBUG_BOUNDS(c, num_of_columns_);
if (get(r,c)!=0) {
if (get(r,c)==0) {
matrix_->InsertGlobalValues(my_global_elements_[r], 1, &v, &c);
} else {
matrix_->ReplaceGlobalValues(my_global_elements_[r], 1, &v, &c);