SyTen
tensor_prod.h File Reference

Tensor-Tensor products. More...

+ Include dependency graph for tensor_prod.h:
+ This graph shows which files directly or indirectly include this file:

Namespaces

namespace  syten
 Syten namespace.
 
namespace  syten::TensorProd
 Implementation helpers for tensor products.
 

Functions

template<Rank summed, Rank frank, Rank srank>
std::enable_if_t< frank+srank - 2 *summed !=0, Tensor< frank+srank - 2 *summed > > syten::TensorProd::prod_impl (SourceLocation location, Tensor< frank > const &a, Tensor< srank > const &b, std::array< int, frank > const &c_a, std::array< int, srank > const &c_b, Conj const conj=Conj::n(), EliminateZeros const ezeros=EliminateZeros::No, HandleFermions const handle_ferms=HandleFermions::n(), ConstSpan< Index > ferm_a=ConstSpan< Index >(), ConstSpan< Index > ferm_b=ConstSpan< Index >(), ConstSpan< Bool > parity_a=ConstSpan< Bool >(), ConstSpan< Bool > parity_b=ConstSpan< Bool >())
 Implementation of the tensor-tensor-to-tensor product. More...
 
template<Rank r>
SDef syten::TensorProd::prod_impl (SourceLocation location, Tensor< r > const &a, Tensor< r > const &b, std::array< int, r > const &c_a, std::array< int, r > const &c_b, Conj const conj=Conj::n(), HandleFermions const handle_ferms=HandleFermions::n(), ConstSpan< Index > ferm_a=ConstSpan< Index >(), ConstSpan< Index > ferm_b=ConstSpan< Index >(), ConstSpan< Bool > parity_a=ConstSpan< Bool >(), ConstSpan< Bool > parity_b=ConstSpan< Bool >())
 Implementation of tensor-tensor-to-scalar product. More...
 
template<Rank summed, Rank frank, Rank srank>
std::pair< std::array< int, frank >, std::array< int, srank > > syten::TensorProd::prod_trans_str_arr (std::string_view const full, SourceLocation location)
 Translates a string coming from a Einstein-summation convention tensor product specification into the standard array format. More...
 
template<Rank rrank>
std::vector< std::vector< std::tuple< Index, Index > > > syten::TensorProd::sort_proto_prod_all (std::vector< std::tuple< Index, Index, std::array< RDef, rrank *SYTEN_MAX_SYM *SYTEN_MAX_DEG > > > const &protolist)
 Sorts worklist pair items according to the quantum number sectors of the result. More...
 
Tensor-Tensor-to-Tensor products.
template<Rank summed, Rank frank, Rank srank>
std::enable_if_t< frank+srank - 2 *summed !=0, Tensor< frank+srank - 2 *summed > > syten::prod (Tensor< frank > const &a, Tensor< srank > const &b, std::array< int, frank > const &c_a, std::array< int, srank > const &c_b, bool const conj=false, EliminateZeros const ezeros=EliminateZeros::No, SourceLocation location=SourceLocation::current())
 Legacy variant 1 of the Tensor-Tensor-to-Tensor product. More...
 
template<Rank summed, Rank frank, Rank srank>
std::enable_if_t< frank+srank - 2 *summed !=0, Tensor< frank+srank - 2 *summed > > syten::prod (Tensor< frank > const &a, Tensor< srank > const &b, std::initializer_list< int > l_a, std::initializer_list< int > l_b, bool const conj=false, EliminateZeros const ezeros=EliminateZeros::No, SourceLocation location=SourceLocation::current())
 Legacy variant 3 of the Tensor-Tensor-to-Tensor product. More...
 
template<Rank summed, Rank frank, Rank srank>
std::enable_if_t< frank+srank - 2 *summed !=0, Tensor< frank+srank - 2 *summed > > syten::prod (Tensor< frank > const &a, Tensor< srank > const &b, std::map< int, int > const &m_a, std::map< int, int > const &m_b, bool const conj=false, EliminateZeros const ezeros=EliminateZeros::No, SourceLocation location=SourceLocation::current())
 Legacy variant 2 of the Tensor-Tensor-to-Tensor product. More...
 
template<Rank summed, Rank frank, Rank srank>
std::enable_if_t< frank+srank - 2 *summed !=0, Tensor< frank+srank - 2 *summed > > syten::prod (Tensor< frank > const &a, Tensor< srank > const &b, std::string_view prodspec, Conj const conj=Conj::n(), EliminateZeros const ezeros=EliminateZeros::No, SourceLocation location=SourceLocation::current())
 Preferred form of the Tensor-Tensor-to-Tensor product. More...
 
Tensor-Tensor-to-Scalar products.
template<Rank r>
SDef syten::prod (Tensor< r > const &a, Tensor< r > const &b, std::string_view prodspec, Conj const conj=Conj::n(), SourceLocation location=SourceLocation::current())
 Scalar product of two tensors with reordering allowed. More...
 
template<Rank rank>
SDef syten::prod (Tensor< rank > const &a, Tensor< rank > const &b, Conj const conj=Conj::y(), SourceLocation location=SourceLocation::current())
 Scalar product of two tensors. More...
 

Detailed Description

Tensor-Tensor products.