|
template<Rank rank, typename Scalar > |
ScalarBase< Scalar >::type | syten::abs (SparseTensor< rank, Scalar > const &a) |
| norm of a sparse tensor, i.e. the 2-norm were the tensor reshaped into a vector More...
|
|
template<Rank rank, typename Scalar , typename RetScalar = Scalar> |
ScalarBase< RetScalar >::type | syten::absSqd (SparseTensor< rank, Scalar > const &a) |
| Squared norm of a sparse tensor, i.e. the squared 2-norm were the tensor reshaped into a vector. More...
|
|
template<Rank rank, typename Scalar > |
std::pair< std::size_t, typename ScalarBase< Scalar >::type > | syten::avgAbs (SparseTensor< rank, Scalar > const &a) |
| Returns the sum of the absolute non-zero values and the total number of entries of the sparse tensor. More...
|
|
SparseTensor< rank-1, Scalar > ::type | syten::dropDummy (SparseTensor< rank, Scalar > const &a, Rank position) |
| Drops a one-dimensional dummy index at the specified position, i.e. for \( a \in [2, 3, 1] \), dropDummy(a, 3) = b` with \( b
\in [2, 3] \). More...
|
|
template<Rank rank, typename Scalar , typename RetScalar = Scalar> |
SparseTensor< rank, RetScalar > | syten::elem_abs (SparseTensor< rank, Scalar > const &a) |
| Returns a sparse tensor \( R \) such that for all \( i \), \( R_i = |a_i| \). More...
|
|
template<Rank rank, typename Scalar > |
SparseTensor< rank+1, Scalar > | syten::insertDummy (SparseTensor< rank, Scalar > const &a, Rank position) |
| Inserts a 1-dimensional dummy index at the specified position, i.e. for \( a \in [2, 3, 4] \), insertDummy(a, 2) = b with \( b
\in [2, 1, 3, 4] \). More...
|
|
template<typename Scalar > |
void | syten::invertDiagonal (SparseTensor< 2, Scalar > &a) |
| Inverts the diagonal data.first of a square matrix in place, leaving zeros untouched. More...
|
|
template<Rank rank, typename Scalar > |
std::tuple< ParallelKind, Scalar, Scalar > | syten::isParallel (SparseTensor< rank, Scalar > const &a, SparseTensor< rank, Scalar > const &b) |
| Checks if two tensors are parallel, i.e. \( a_i = c \; b_i \quad \forall i \). More...
|
|
template<typename Scalar > |
void | syten::makeIdentity (SparseTensor< 2, Scalar > &a) |
| Makes a into a two-dimensional identity matrix. More...
|
|
template<Rank rank, typename Scalar > |
ScalarBase< Scalar >::type | syten::max (SparseTensor< rank, Scalar > const &a) |
| Returns the element with the greatest magnitude in the sparse tensor. More...
|
|
template<Rank rank, typename Scalar > |
ScalarBase< Scalar >::type | syten::norm (SparseTensor< rank, Scalar > const &a) |
| norm of a sparse tensor, i.e. the 2-norm were the tensor reshaped into a vector More...
|
|
template<Rank rank, typename Scalar , typename RetScalar = Scalar> |
ScalarBase< RetScalar >::type | syten::normSqd (SparseTensor< rank, Scalar > const &a) |
| Squared norm of a sparse tensor, i.e. the squared 2-norm were the tensor reshaped into a vector. More...
|
|
template<Rank rank, typename Scalar > |
std::ostream & | syten::operator<< (std::ostream &out, SparseTensor< rank, Scalar > const &t) |
| Pretty output of sparse tensors. More...
|
|
template<Rank summed, Rank frank, typename Scalar > |
std::enable_if< frank==summed, Scalar >::type | syten::prodS (SparseTensor< frank, Scalar > const &a, SparseTensor< frank, Scalar > const &b, bool conjugate=true) |
| Scalar product/full contraction of two sparse tensors, again see syten::prodD for a full discussion. More...
|
|
template<Rank summed, Rank frank, Rank srank, typename Scalar > |
SparseTensor< frank+srank - 2 *summed, Scalar > | syten::prodS (SparseTensor< frank, Scalar > const &a, SparseTensor< srank, Scalar > const &b, std::array< int, frank > const &c_a, std::array< int, srank > const &c_b, bool conjugate=false, bool calc_abs=true) |
| Product of two sparse tensors, see syten::prodD for a detailed discussion of the arguments. More...
|
|
template<Rank r, typename Scalar > |
Scalar | syten::prodS (SparseTensor< r, Scalar > const &a, SparseTensor< r, Scalar > const &b, std::array< int, r > const &c_a, std::array< int, r > const &c_b, bool conjugate=false, bool=true) |
| Complete product of two unordered sparse tensors. More...
|
|
template<typename Scalar > |
Scalar | syten::trace (SparseTensor< 2, Scalar > const &a) |
| Trace of a sparse matrix. More...
|
|
bool | syten::validateCGCContraction (SparseTensor< 2 > const &input) |
| Returns true if input is proportional to the identity matrix. More...
|
|
template<Rank rank, typename Scalar > |
bool | syten::validateCGCTensor (SparseTensor< rank, Scalar > const &a) |
| CGC tensors are supposed to give the identity whenever contracted with themselves over all but one leg. More...
|
|
Implements SparseTensor and related functions.