SyTen
syten::GenericDenseTensorImpl Namespace Reference

Implementation for the generic dense tensor. More...

Classes

struct  GenericDenseTensor
 Implementation for syten::GenericDenseTensor. More...
 

Functions

template<Rank rank, typename Scalar , template< Rank ra, typename Scalara > typename A, template< Rank rb, typename Scalarb > typename B>
void addScaled (A< rank, Scalar > &, B< rank, Scalar > const &, typename IdentityType< Scalar >::type const, EliminateZeros const)
 Dummy implementation to be used if no better implementations are available. More...
 
template<Rank rank, typename Scalar >
void addScaled (GenericDenseTensor< rank, Scalar > &a, GenericDenseTensor< rank, Scalar > const &b, typename IdentityType< Scalar >::type const factor, EliminateZeros const ezeros)
 \( a_i = a_i + f b_i \) for generic dense tensors. More...
 
template<Rank rank, typename Scalar >
bool isZero (GenericDenseTensor< rank, Scalar > const &a)
 Returns true if all elements of a are exactly zero. More...
 
template<Rank rank, typename Scalar >
GenericDenseTensor< rank, Scalar > multi_transpose (GenericDenseTensor< rank, Scalar > const &in, ConstSpan< Index > perm, Conj do_conj=Conj::n())
 
template<Rank rank, typename Scalar >
ScalarBase< Scalar >::type normSqd (GenericDenseTensor< rank, Scalar > const &a)
 Returns the squared norm of the generic dense tensor a. More...
 
template<Rank rank, typename ScalarA , typename ScalarB , template< Rank ra, typename ScalarAa > typename A>
A< rank, ScalarA > & operator*= (A< rank, ScalarA > &a, ScalarB)
 Dummy implementation to scale a dense tensor by a scalar. More...
 
template<Rank rank, typename ScalarA , typename ScalarB >
GenericDenseTensor< rank, ScalarA > operator*= (GenericDenseTensor< rank, ScalarA > &&a, ScalarB const &b)
 \( a_{i\ldots} = b \cdot a_{i\ldots} \) More...
 
template<Rank rank, typename ScalarA , typename ScalarB >
GenericDenseTensor< rank, ScalarA > & operator*= (GenericDenseTensor< rank, ScalarA > &a, ScalarB const &b)
 \( a_{i\ldots} = b \cdot a_{i\ldots} \) More...
 
template<Rank summed, Rank frank, Rank srank, typename Scalar , typename A , typename B >
GenericDenseTensor< frank+srank - 2 *summed, Scalar > prodD (A const &, B const &, std::array< int, frank > const &, std::array< int, srank > const &, bool=false, EliminateZeros const =EliminateZeros::No, DenseProduct::TemporaryTransposeStorage< Scalar, frank, srank > *=nullptr)
 Dummy implementation for unsupported/unimplemented dense tensor products. More...
 
template<Rank r, typename Scalar , typename A , typename B >
Scalar prodD (A const &, B const &, std::array< int, r > const &, std::array< int, r > const &, bool=false)
 Dummy implementation for unsupported/unimplemented dense tensor products to scalars. More...
 
template<Rank summed, Rank frank, Rank srank, typename Scalar , std::enable_if_t<(int(frank)+int(srank) - 2 *int(summed) > 0), int > = 0>
GenericDenseTensor< frank+srank - 2 *summed, Scalar > prodD (GenericDenseTensor< frank, Scalar > const &a, GenericDenseTensor< srank, Scalar > const &b, std::array< int, frank > const &c_a, std::array< int, srank > const &c_b, bool conjugate=false, EliminateZeros const ezeros=EliminateZeros::No, DenseProduct::TemporaryTransposeStorage< Scalar, frank, srank > *tts=nullptr)
 Product wrapper for generic dense tensors. More...
 
template<Rank r, typename Scalar >
Scalar prodD (GenericDenseTensor< r, Scalar > const &a, GenericDenseTensor< r, Scalar > const &b, std::array< int, r > const &c_a, std::array< int, r > const &c_b, bool conjugate=false)
 Product wrapper for generic dense tensors to scalars. More...
 

Detailed Description

Implementation for the generic dense tensor.