gen_fun::summate: properly keep track of number of attempts
commit332a2d4f83a5355e4f2440ca2ac9652c5cbe9e1e
authorSven Verdoolaege <skimo@kotnet.org>
Mon, 12 Dec 2016 08:45:35 +0000 (12 09:45 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 29 Dec 2016 11:02:32 +0000 (29 12:02 +0100)
tree206b110cad06657d49ad6db24b579208150b86a6
parentced8959481a34e0708fa035b6e16e7954aee870a
gen_fun::summate: properly keep track of number of attempts

Since 95ea4d5 (randomvector: double size of coefficients on each attempt,
Wed Mar 10 15:11:58 2010 +0100), the maximum value of the elements
in the random vector is increased on every attempt, but only
np_base::start would actually keep track of the number of attempts.
gen_fun::summate, on the other hand, would just reset the number
of attempts to zero on every iteration, defeating the purpose
of keeping track of the number of attempts.
Move the initialization out of the loop.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
genfun.cc