- From: <francisco.grimaldo AT uv.es>
- To: graphstream-users AT litislab.fr
- Subject: Bug in BarabasiAlbertGenerator
- Date: Tue, 29 May 2012 20:05:14 +0200 (CEST)
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
- Bug in BarabasiAlbertGenerator, francisco.grimaldo, 29/05/2012
Archives gérées par MHonArc 2.6.16.