auto solver = DenseEigensolver::DenseEigensolver<SDef>(
transpose(mat));
DenseTensor<2> dia({10, 10});
for(
Index i(0); i != 10; ++i) { dia[{i,i}] = solver.evalues[i]; }
auto lvecs =
conj(solver.left_evectors);
auto lm = prodD<1>(lvecs, mat, {-1, 1}, {1, -2});
auto dl = prodD<1>(dia, lvecs, {-1, 1}, {1, -2});
std::uint32_t Index
The standard index type for tensors, see also Scalar types.
Definition: scalars.h:25
void makeRandom(DenseTensor< rank, Scalar > &a, double b=-2., double e=2.)
Fills the tensor with random values between b and e.
Definition: dense_make.h:12
DenseTensor< rank, Scalar > conj(DenseTensor< rank, Scalar > const &a)
Returns the element-wise complex-conjugate of a
Definition: dense_conj.h:21
void transpose(ConstSpan< Scalar > const inp, MutSpan< Scalar > out, [[maybe_unused]] ConstSpan< Index > in_perm, [[maybe_unused]] ConstSpan< Index > in_dim, [[maybe_unused]] Conj do_conj=Conj::n(), [[maybe_unused]] bool do_checks=true)
Entry point for transposition of a continuous array into another array.
Definition: dense_transpose.h:373