| 254 | |
| 255 | |
| 256 | qmatrix getRandomNonSquareMatrix(size_t numRows, size_t numCols) { |
| 257 | |
| 258 | // this function is DANGEROUS; it produces a |
| 259 | // non-square matrix, whereas most test utilities |
| 260 | // assume qmatrix is square. It should ergo be |
| 261 | // used very cautiously! |
| 262 | |
| 263 | qmatrix out = qmatrix(numRows, qvector(numCols)); |
| 264 | |
| 265 | for (auto& row : out) |
| 266 | for (auto& elem : row) |
| 267 | elem = getRandomComplex(); |
| 268 | |
| 269 | return out; |
| 270 | } |
| 271 | |
| 272 | |
| 273 | qmatrix getRandomMatrix(size_t dim) { |
no test coverage detected