|
inline |
Returns a const reference to the element at the specified coordinate or zero.
Use this if you have a const SparseTensor
and hence can ensure that no values are written to it, as references are much cheaper than copying the relatively large scalar values stored here.
References syten::SparseTensor< rank, Scalar >::FullData::dims, syten::SparseTensor< rank, Scalar >::FullData::elements, syten::SparseTensor< rank, Scalar >::fullData, syten::rank(), syten::SparseTensor< rank, Scalar >::singleton, syten::SparseTensor< rank, Scalar >::singletonValue, SYTEN_ASSERT_DEBUG, and syten::SparseTensor< rank, Scalar >::zero.