Browse Source

Fixed two typos in src/sparse/static_sparse_matrix.h

tempestpy_adaptions
PBerger 12 years ago
parent
commit
c10a0ee734
  1. 6
      src/sparse/static_sparse_matrix.h

6
src/sparse/static_sparse_matrix.h

@ -197,7 +197,7 @@ class StaticSparseMatrix {
Eigen::SparseMatrix<T> toEigenSparseMatrix() { Eigen::SparseMatrix<T> toEigenSparseMatrix() {
typedef Eigen::Triplet<double> ETd; typedef Eigen::Triplet<double> ETd;
std::vector<ETd> tripletList; std::vector<ETd> tripletList;
triplets.reserve(non_zero_entry_count + row_count);
tripletList.reserve(non_zero_entry_count + row_count);
uint_fast32_t row_start; uint_fast32_t row_start;
uint_fast32_t row_end; uint_fast32_t row_end;
@ -210,10 +210,10 @@ class StaticSparseMatrix {
} }
} }
for (uint_fast32_t i = 1; i <= row_count; ++i) { for (uint_fast32_t i = 1; i <= row_count; ++i) {
tripletList .push_back(ETd(i, i, diagonal_storage[i]));
tripletList.push_back(ETd(i, i, diagonal_storage[i]));
} }
SparseMatrixType mat(row_count, row_count);
Eigen::SparseMatrix<T> mat(row_count, row_count);
mat.setFromTriplets(tripletList.begin(), tripletList.end()); mat.setFromTriplets(tripletList.begin(), tripletList.end());
mat.makeCompressed(); mat.makeCompressed();

Loading…
Cancel
Save