Commit f8923774 authored by Dmitry Bagaev's avatar Dmitry Bagaev

2prev

parent 7a9268d4
...@@ -226,7 +226,7 @@ void Band(int n, int r, Sparse::Matrix & A) ...@@ -226,7 +226,7 @@ void Band(int n, int r, Sparse::Matrix & A)
A.SetInterval(idmin,idmax); A.SetInterval(idmin,idmax);
for (int i=idmin; i<idmax; i++) { for (int i=idmin; i<idmax; i++) {
for (int j=std::max(0, i - r); j < std::max(i + r, n); j++) { for (int j=std::max(0, i - r); j < std::min(i + r, n); j++) {
if (abs(i - j) < r) { if (abs(i - j) < r) {
if (i == j) { if (i == j) {
A[i][j] = (ndiag - 1.) + 1e-3; A[i][j] = (ndiag - 1.) + 1e-3;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment