Template Function Jet::Utilities::DiagMatrix¶
Defined in File Utilities.hpp
Function Documentation¶
-
template<typename
Tensor
, typenameT
>
inline TensorJet::Utilities
::
DiagMatrix
(const std::vector<T> &vec)¶ Returns a diagonal tensor with the given main diagonal.
- Template Parameters
Tensor – Type of the tensor.
T – Type of the diagonal entries.
- Parameters
vec – Entries to be copied to the main diagonal of the tensor.
- Returns
Tensor with the given main diagonal.
api/function_Utilities_8hpp_1ace45a3f26c171e304044e07640bc0b8b
Download Python script
Download Notebook
View on GitHub