void syten::sort_cols_sparsity | ( | DenseTensor< 2, Scalar > & | a, |
DenseTensor< 2, Scalar > & | p | ||
) |
Sorts the columns of a
in-place to have the sparsest columns first.
Sparsity is measured by a number of sparsity points. 1 point for each element exactly 0 and 0.1 point for each element under SYTEN_SMALL_THRESHOLD. Scale columns to have the similar 2-norm first, otherwise the second point makes no sense.
References syten::Deparallelise::cols(), syten::Cuda::copy(), syten::DenseTensor< rank, Scalar >::dim(), syten::DenseTensor< rank, Scalar >::getDims(), std::move(), std::sort(), SYTEN_SMALL_THRESHOLD, and underThreshold().