| 92 | |
| 93 | template <typename type> |
| 94 | const matrix<type> rand_sp_banded(long n, long bw) |
| 95 | { |
| 96 | matrix<type> m = 10 * identity_matrix<type>(n); |
| 97 | for (long row = 0; row < m.nr(); ++row) |
| 98 | { |
| 99 | for (long col = row; col < min(m.nc(), row + bw); ++col) |
| 100 | { |
| 101 | type r = rnd.get_random_double(); |
| 102 | m(row,col) += r; |
| 103 | m(col,row) += r; |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | return m; |
| 108 | } |
| 109 | |
| 110 | void matrix_test ( |
| 111 | ) |
nothing calls this directly
no test coverage detected