nd7141 / influence-maximization

Repository for research project that studies influence maximization problem.
158 stars 66 forks source link

there is a bug in LDAG.py #1

Open guinao opened 9 years ago

guinao commented 9 years ago

Hi, I have been working on Influence Maximization under LT model these days. Your codes help me a lot on understanding these algorithms and test my program. After these days' effort, I find that the function tsort in the file influence-maximizaton/LT/LDAG.py might be wrong. For the following codes, the output is [0, 1, 3, 3, 4, 4, 5] while there shouldn't be dunplicate elements in topological sort. D = nx.DiGraph() D.add_edge(1, 0, weight=1) D.add_edge(3, 0, weight=1) D.add_edge(3, 1, weight=1) D.add_edge(4, 1, weight=1) D.add_edge(4, 3, weight=1) D.add_edge(5, 3, weight=1) print tsort(D, 0, reach='in')

nd7141 commented 9 years ago

Interesting! Thank you for notice.

I used functions for LT model very little, mostly for the reference, and indeed haven't tested them yet. If you need to have tested code, I would ask the authors for their source (it would be most likely in C++).