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

Cache the tree size in the GenericSolver #52

Open
Whebon opened this issue May 6, 2024 · 0 comments
Open

Cache the tree size in the GenericSolver #52

Whebon opened this issue May 6, 2024 · 0 comments

Comments

@Whebon
Copy link
Contributor

Whebon commented May 6, 2024

"""
    function get_tree_size(solver::GenericSolver)::Int

Returns the number of [`AbstractRuleNode`](@ref)s in the tree.
"""
function get_tree_size(solver::GenericSolver)::Int
    #TODO: optimization: precompute/cache the size of the tree
    return length(get_tree(solver))
end
@Whebon Whebon changed the title Improve get_tree_size Cache the tree size in the GenericSolver May 6, 2024
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

1 participant