SyTen
dense_transpose.h File Reference

Transposing a DenseTensor. More...

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

Namespaces

namespace  syten
 Syten namespace.
 

Functions

template<typename Scalar >
void syten::invertDiagonal (DenseTensor< 2, Scalar > &a, typename ScalarBase< Scalar >::type scale)
 Approximately inverts the diagonal elements of a square matrix in place, leaving zeros untouched and using a Lorentzian broadening, i.e. replacing \( x_{i,i} \to \frac{x_{i,i}}{x_{i,i}^2 + \varepsilon} \) with \( \varepsilon \) equal to SYTEN_BROADENING_EPSILON times the supplied scale, which should be the magnitude of the overall largest inverted singular value. More...
 
template<Rank rank, typename Scalar , TransposeMethod method = TransposeMethod::Default>
DenseTensor< rank, Scalar > syten::multi_transpose (DenseTensor< rank, Scalar > const &in, ConstSpan< Index > perm, Conj do_conj=Conj::n())
 Standard entry point for the transposition of a syten::DenseTensor. More...
 
template<Rank rank, typename Scalar , TransposeMethod method = TransposeMethod::Default, typename Indices = std::make_index_sequence<(rank < 2 ? 0 : (rank - 2))>>
void syten::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. More...
 
template<Rank rank, typename Scalar >
DenseTensor< rank, Scalar > syten::transpose_exchange (DenseTensor< rank, Scalar > const &a, ConstSpan< Index > const &axes, Conj conjugate=Conj::n())
 Transposes two axes of a dense tensor using DenseIter objects. More...
 
template<Rank rank, typename Scalar , TransposeMethod method = TransposeMethod::Default, Rank... Ranks>
void syten::transpose_impl (ConstSpan< Scalar > const inp, MutSpan< Scalar > out, ConstSpan< Index > in_perm, ConstSpan< Index > in_dim, Conj do_conj=Conj::n(), bool do_checks=true, std::index_sequence< Ranks... >={})
 Implementation of syten::transpose() below. More...
 
template<Rank rank, typename Scalar >
void syten::transpose_iter_rseq (ConstSpan< Scalar > const inp, MutSpan< Scalar > out, ConstSpan< IndexNumber > perm, ConstSpan< Index > dim, Conj do_conj=Conj::n())
 Dense tensor transposition using a DenseIterDual and reading sequentially. More...
 
template<Rank rank, typename Scalar >
void syten::transpose_iter_wseq (ConstSpan< Scalar > const inp, MutSpan< Scalar > out, ConstSpan< IndexNumber > perm, ConstSpan< Index > dim, Conj do_conj=Conj::n())
 Dense tensor transposition using a DenseIterDual and writing sequentially. More...
 
template<Rank rank, typename Scalar >
void syten::transpose_recursive (ConstSpan< Scalar > const inp, MutSpan< Scalar > out, ConstSpan< IndexNumber > in_perm, ConstSpan< Index > in_dim, Conj do_conj=Conj::n())
 Recursive dense tensor transposition. More...
 
template<Rank rank, typename Scalar >
void syten::transpose_recursive_impl (ConstSpan< Scalar > const inp, MutSpan< Scalar > out, MutSpan< Scalar > workspace, ConstSpan< IndexNumber > perm, ConstSpan< Index > dim)
 Implementation of the recursive dense tensor transposition. More...
 

Detailed Description

Transposing a DenseTensor.