Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

there is a bug in LDAG.py #1

Open
guinao opened this issue Jul 30, 2015 · 1 comment
Open

there is a bug in LDAG.py #1

guinao opened this issue Jul 30, 2015 · 1 comment

Comments

@guinao
Copy link

guinao commented Jul 30, 2015

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
Copy link
Owner

nd7141 commented Jul 30, 2015

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++).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants