Mentions légales du service

Skip to content
Snippets Groups Projects
Commit e394b9ac authored by hhakim's avatar hhakim
Browse files

Modify power_iteration stopping criterion in order to fix issue #131.

parent 681cd4b1
No related branches found
No related tags found
No related merge requests found
......@@ -668,9 +668,9 @@ FPP Faust::power_iteration(const Faust::LinearOperator<FPP,Cpu> & A, const faus
FPP lambda = 0.0;
FPP alpha = 1.0;
FPP beta = 0.0;
while(Faust::fabs(lambda_old-lambda)> Faust::fabs(threshold) && i<nbr_iter_max)
while((Faust::fabs(lambda_old-lambda)> Faust::fabs(threshold) || Faust::fabs(lambda) <= Faust::fabs(threshold)) && i<nbr_iter_max)
{
i++;
i++;
lambda_old = lambda;
xk_norm = xk;
xk_norm.normalize();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment