@@ -708,19 +708,30 @@ namespace cytnx {
708708 subspace, and the smallest singular values are less reliable. Use truncation with oversampling.
709709 @param[in] is_U if \em true, the left-unitary UniTensor U (isometry) is returned.
710710 @param[in] is_vT if \em true, the right-unitary UniTensor vT (isometry) is returned.
711+ @param[in] mindim at least this amount of singular values are kept in each block.
712+ @param[in] oversampling_summand the randomized SVD computes [(1 + oversampling_factor) *
713+ keepdim*d/D + oversampling_summand] singular values in each block before further truncating,
714+ where d is the block dimension and D the full tensor dimension (each being the minimum of row
715+ and column dimension of the block or tensor respectively).
716+ @param[in] oversampling_factor see oversampling_summand
711717 @param[in] power_iteration number of iterations for the power method: Y = (A *
712718 Adag)^power_iteration * A * Tin
713719 @param[in] seed the seed for the random generator. [Default] Using device entropy.
714720 @see Rand_isometry(const Tensor &Tin, const cytnx_uint64 &keepdim, const cytnx_uint64
715721 &power_iteration, const unsigned int &seed)
716722 @see Rsvd()
717723 @see Gesvd()
724+ @note At least one singular value per symmetry sector is always kept.
725+ @note More than keepdim singular values might be returned (depending on mindim,
726+ oversampling_summand, oversampling_factor, and symmetry sector sizes).
718727 @warning No truncation of the singular values is performed, and the smaller ones will be
719728 inaccurate. Use Rsvd() for a truncated version that drops small singular values.
720729 */
721730 std::vector<cytnx::UniTensor> Rsvd_notruncate (
722731 const cytnx::UniTensor &Tin, cytnx_uint64 keepdim, bool is_U = true , bool is_vT = true ,
723- cytnx_uint64 power_iteration = 2 , unsigned int seed = random::__static_random_device());
732+ cytnx_uint64 mindim = 1 , cytnx_uint64 oversampling_summand = 0 ,
733+ double oversampling_factor = 0 ., cytnx_uint64 power_iteration = 2 ,
734+ unsigned int seed = random::__static_random_device());
724735
725736 /* *
726737 @brief Perform Singular-Value decomposition on a UniTensor using ?gesvd method.
@@ -865,10 +876,12 @@ namespace cytnx {
865876 the largest error will be pushed back to the vector (The smallest singular value in the return
866877 singular values matrix \f$ S \f$.) If \p return_err is > 1, then the full list of truncated
867878 singular values will be returned.
868- @param[in] oversampling_summand the randomized SVD computes (1 + oversampling_fact) * keepdim +
869- oversampling_summand before further truncating to keepdim
870- @param[in] oversampling_fact the randomized SVD computes (1 + oversampling_fact) * keepdim +
871- oversampling_summand before further truncating to keepdim
879+ @param[in] mindim at least this amount of singular values are kept in each block.
880+ @param[in] oversampling_summand the randomized SVD computes [(1 + oversampling_factor) *
881+ keepdim*d/D + oversampling_summand] singular values in each block before further truncating,
882+ where d is the block dimension and D the full tensor dimension (each being the minimum of row
883+ and column dimension of the block or tensor respectively).
884+ @param[in] oversampling_factor see oversampling_summand
872885 @param[in] power_iteration number of iterations for the power method: Y = (A *
873886 Adag)^power_iteration * A * Tin
874887 @param[in] seed the seed for the random generator. [Default] Using device entropy.
@@ -1887,10 +1900,12 @@ namespace cytnx {
18871900 the largest error will be pushed back to the vector (The smallest singular value in the return
18881901 singular values matrix \f$ S \f$.) If \p return_err is a \em positive int, then the
18891902 full list of truncated singular values will be returned.
1890- @param[in] oversampling_summand the randomized SVD computes (1 + oversampling_fact) * keepdim +
1891- oversampling_summand before further truncating to keepdim
1892- @param[in] oversampling_fact the randomized SVD computes (1 + oversampling_fact) * keepdim +
1893- oversampling_summand before further truncating to keepdim
1903+ @param[in] mindim at least this amount of singular values are kept in each block.
1904+ @param[in] oversampling_summand the randomized SVD computes [(1 + oversampling_factor) *
1905+ keepdim*d/D + oversampling_summand] singular values in each block before further truncating,
1906+ where d is the block dimension and D the full tensor dimension (each being the minimum of row
1907+ and column dimension of the block or tensor respectively).
1908+ @param[in] oversampling_factor see oversampling_summand
18941909 @param[in] power_iteration number of iterations for the power method: Y = (A *
18951910 Adag)^power_iteration * A * Tin
18961911 @param[in] seed the seed for the random generator. [Default] Using device entropy.
0 commit comments