|
From: | giorgio delzeri |
Subject: | Re: [igraph] How to avoid indexing issues with "which" fuction |
Date: | Wed, 7 Jun 2017 11:28:58 +0200 |
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
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help
[Prev in Thread] | Current Thread | [Next in Thread] |