| 971 | /* identity square matrix generation */ |
| 972 | template<typename typ> |
| 973 | static inline void |
| 974 | identity_matrix(typ *matrix, size_t n) |
| 975 | { |
| 976 | size_t i; |
| 977 | /* in IEEE floating point, zeroes are represented as bitwise 0 */ |
| 978 | memset(matrix, 0, n*n*sizeof(typ)); |
| 979 | |
| 980 | for (i = 0; i < n; ++i) |
| 981 | { |
| 982 | *matrix = numeric_limits<typ>::one; |
| 983 | matrix += n+1; |
| 984 | } |
| 985 | } |
| 986 | |
| 987 | /* lower/upper triangular matrix using blas (in place) */ |
| 988 |
no outgoing calls
no test coverage detected