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

Changed the backward method implementation from recursive to stack #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Mikelenjilo
Copy link

I run into a proble of RecursionError when the depth of the graph is longer than 1000. That may happen when there is a very long mathematical expression based on atomic operations (+, -, etc.). So the new implementation is based on the DPS algorithm using a stack. This removes the recursion limit (default to 1000) and can create a topological graph for an infinite depth.

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

Successfully merging this pull request may close these issues.

1 participant