Template Function Jet::Utilities::DiagExp

Function Documentation

template<typename scalar_type_t>
inline std::vector<std::complex<scalar_type_t>> Jet::Utilities::DiagExp(const std::vector<std::complex<scalar_type_t>> &mat)

Returns a diagonal matrix with the same dimensions of the given matrix where each entry along the main diagonal is derived by applying std::exp() to the corresponding entry in the given matrix.

Template Parameters

scalar_type_t – Template parameter of std::complex.

Parameters

mat – Matrix to be converted into a diagonal matrix.

Returns

Matrix representing the diagonal exponentation of the given matrix.