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] \).
References syten::SparseTensor< rank, Scalar >::dim(), syten::SparseTensor< rank, Scalar >::dims(), dropDummy(), syten::SparseTensor< rank, Scalar >::isSingleton(), std::make_pair(), rank(), SYTEN_ASSERT_DEBUG, and syten::SparseTensor< rank, Scalar >::valSingleton().
Referenced by dropDummy(), and syten::STensorImpl::remove_dummy_leg().