Dense nonsymmetric eigensolver, nonfunctional templated inheritance base.
int main(int argc, char** argv) {
opt.add_options()
("length,l", boost::program_options::value(&sidelength), "sidelength")
;
for(
Index i(0); i != sidelength; ++i) {
diag[{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>(diag, lvecs, {-1, 1}, {1, -2});
auto rvecs =
transpose(solver.right_evectors);
auto mr = prodD<1>(mat, rvecs, {-1, 1}, {1, -2});
auto rd = prodD<1>(rvecs, diag, {-1, 1}, {1, -2});
return 0;
}
}
int main(int argc, char** argv) { return syten::main(argc, argv); }
#define SYTEN_BPO_EXEC
End the boost::program_options section with this.
Definition: bpo_helper.h:67
#define SYTEN_BPO_INIT
Start the boost::program_options section with this.
Definition: bpo_helper.h:50
Helper macros to handle repetitive use of boost::program_options.
Convenience functions for dense tensors, to be included by dense.h.
Eigensolver for a single dense tensor.
Operators acting on DenseTensor.
Implementation of products/contractions of dense tensors.
Transposing a DenseTensor.
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
ScalarBase< Scalar >::type norm(DenseTensor< rank, Scalar > const &a)
, see abs()
Definition: dense_convenience.h:121
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, ConstSpan< Index > in_perm, ConstSpan< Index > in_dim, Conj do_conj=Conj::n(), bool do_checks=true)
Entry point for transposition of a continuous array into another array.
Definition: dense_transpose.h:373
Syten namespace.
Definition: basis-trafo.cpp:8
Dense nonsymmetric eigensolver, nonfunctional template base.
Definition: dense_eigensolver.h:130