SyTen

◆ insertDummy() [2/4]

template<Rank rank, typename Scalar >
SparseTensor< rank+1, Scalar > syten::insertDummy ( SparseTensor< rank, Scalar > const &  a,
Rank  position 
)
inline

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] \).

References syten::SparseTensor< rank, Scalar >::dims(), syten::SparseTensor< rank, Scalar >::insert(), insertDummy(), syten::SparseTensor< rank, Scalar >::isSingleton(), std::make_pair(), and syten::SparseTensor< rank, Scalar >::valSingleton().

+ Here is the call graph for this function: