Skip to content

Commit 36928e7

Browse files
committed
addressing comments
1 parent 9dfb3aa commit 36928e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/LinearAlgebra/COO_Matrix.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ inline COO_Matrix<ScalarT, Intdx>::COO_Matrix(std::vector<Intdx> r, std::vector<
824824
this->column_indices_ = c;
825825
this->rows_size_ = m;
826826
this->columns_size_ = n;
827-
this->sorted_ = false; //SR: Why is this assumed false?
827+
this->sorted_ = true; //Any new entry can assume that the matrix is sorted when being added.
828828
}
829829

830830
/**
@@ -847,7 +847,7 @@ inline COO_Matrix<ScalarT, Intdx>::COO_Matrix(Intdx m, Intdx n)
847847
this->values_ = std::vector<ScalarT>();
848848
this->row_indices_ = std::vector<Intdx>();
849849
this->column_indices_ = std::vector<Intdx>();
850-
this->sorted_ = false; //SR: I think this would be true, since it's empty.
850+
this->sorted_ = true; //Any new entry can assume that the matrix is sorted when being added.
851851
}
852852

853853
/**
@@ -867,7 +867,7 @@ inline COO_Matrix<ScalarT, Intdx>::COO_Matrix()
867867
this->values_ = std::vector<ScalarT>();
868868
this->row_indices_ = std::vector<Intdx>();
869869
this->column_indices_ = std::vector<Intdx>();
870-
this->sorted_ = false; //SR: I think this would be true, since it's empty.
870+
this->sorted_ = true; //Any new entry can assume that the matrix is sorted when being added.
871871
}
872872

873873
template <class ScalarT, typename Intdx>

0 commit comments

Comments
 (0)