Thank you Tamas!
By the way, I probably exposed the algorithm in a wrong way (I don't speak
english very well).
A given percentage of the whole vertices, are selected at the beginning of
the algorithm to be "IMMUNE", and they will be immune all the time, so I
expect to have the same percentage of nodes to be immune at the end of the
algorithm, but some of these nodes passed from "immune" to "spreader"
during the process.
In fact I am wondering if there are some things that I still ignoring, or
something that I wrong... but I don't know what.

Il 5 giu 2017 22:01, "Tamas Nepusz" <[email protected]> ha scritto:

> How can I solve this problem with the algorithm, do you have any idea or
>> advice?
>>
> Try printing the key variables of your algorithm once for every iteration
> of your main loop to check where it is not doing what it should do. This is
> a pretty standard debugging technique; I guess I would do the same if I had
> time to track this down on behalf of you ;)
>
> By the way, using unique() on the set of adjacent vertices in your code
> might be conceptually wrong. By doing so, basically you are saying that it
> does not matter how many neighbors of a particular node are spreaders, a
> node will still have only one "chance" to become a spreader if it was
> immune before. In an extreme case, suppose that there are only two immune
> nodes in your network. One has ten thousand spreader neighbors, and the
> other one has only one. Which one is more likely to become a spreader in
> the next iteration?
>
> T.
>
>
> _______________________________________________
> igraph-help mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
>
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to