Makes diagonal tensor(matrix).
You can find more information in comments below.
template<class TYPE, size_t SIZE>
void diagonal(TTensor<TYPE, SIZE, SIZE> &m, const TYPE value); // Makes diagonal(with specified value) NxN tensor(matrix)
template<class TYPE, size_t SIZE>
void diagonal(TTensor<TYPE, SIZE, SIZE> &m, const std::initializer_list<TYPE> &values); // Populate diagonal values with specified one. Set 1 for rest if size of values is less then diagonal element count. Set non-diagonal elements to zero
Namespace: | nitisa::math |
Include: | Nitisa/Modules/Math/Tensor.h |