SyTen

◆ eigenGen()

std::tuple< Tensor< 2 >, Tensor< 2 >, Tensor< 2 > > syten::Eigen::eigenGen ( Tensor< 2 >  in,
SourceLocation  location = SourceLocation::current() 
)

Decomposes the tensor in into a tuple [r, d, l] such that r·d·l is in (r being based on the right eigenvectors and l being based on the left eigenvectors).

auto [r, d, l] = eigenSym(inp);
auto rd = prod<1>(r, d, "a,b|b,c|a,c");
auto rdl = prod<1>(rd, l "a,c|c,d|a,d");
SYTEN_ASSERT(rdl == inp)
#define SYTEN_ASSERT(x)
Throws a std::runtime_error if the first argument evaluates to false.
Definition: macros.h:57
std::tuple< Tensor< 2 >, Tensor< 2 > > eigenSym(Tensor< 2 > in, SourceLocation location)
Decomposes the tensor in into a tuple [u, d] such that u·d·conj(u) is in.
Definition: tensor_decomposition_eigen.cpp:14

References std::clock(), syten::conj(), std::chrono::duration::count(), syten::Tensor< rank >::dirs, syten::hasCGC(), syten::makeIdentity(), std::move(), std::chrono::high_resolution_clock::now(), syten::Tensor< rank >::size(), SYTEN_ASSERT_MSG, syten::EnvVars::tensor_time, syten::MemoryUsage::totalSize(), and syten::transpose().

Referenced by syten::Pyten::init_tensor_decomp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: