SyTen

◆ partial_abs()

template<Rank rank, typename Scalar >
std::pair<Index, typename ScalarBase<Scalar>::type> syten::partial_abs ( DenseTensor< rank, Scalar > const &  a,
std::array< Index, rank > const &  allowed_entries 
)
inline

Calculates the partial sum of absolute values of entries.

Iteration occurs over all dimensions whose entry in allowed_entries is that dimension. If the entry i in allowed_dimensions is different from a.dim(i+1), the index will be kept fixed at this value.

Returns a pair <number of entries, sum>.

References abs(), syten::DenseTensor< rank, Scalar >::getDims(), syten::k_to_y::ordering(), and rank().

Referenced by syten::Delinearise::cols().

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