- From: Stefan Balev <stefan.balev AT gmail.com>
- To: graphstream-users AT litislab.fr, francisco.grimaldo AT uv.es
- Subject: Re: Bug in BarabasiAlbertGenerator
- Date: Wed, 30 May 2012 11:23:45 +0200
Hi Francisco,
Well spotted, thank you very much for the bug report. We have pushed a
fix on GitHub, it will be packaged and available tomorrow in the next
nightly build :
http://graphstream-project.org/pub/1.x/nightly-build/last/
Don't hesitate to re-post if there are still problems with this generator.
Cheers,
--
Stefan
2012/5/29
<francisco.grimaldo AT uv.es>:
>
>
Hi all,
>
>
I think I have found a bug in the BarabasiAlbertGenerator class.
>
>
When the number of links and nodes is increased (e.g. 200 nodes with
>
maxLinksPerStep=20), the generator raises several "Aieuu!" errors which
>
finally
>
lead to an IndexOutOfBoundsException. I have been having a look to the
>
source
>
code and the problem is in the first line of function "chooseAnotherNode".
>
When
>
it says:
>
int sumDeg = (edgesCount - degrees.get(index)) * 2;
>
It should say:
>
int sumDeg = (edgesCount * 2) - degrees.get(index);
>
>
Best,
>
Francisco Grimaldo
Archives gérées par MHonArc 2.6.16.