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

Lazy segment tree is difficult to modify for other operations #227

Open
IvanRenison opened this issue Jul 14, 2023 · 3 comments · May be fixed by #228
Open

Lazy segment tree is difficult to modify for other operations #227

IvanRenison opened this issue Jul 14, 2023 · 3 comments · May be fixed by #228

Comments

@IvanRenison
Copy link
Contributor

The lazy segment tree of this is repo very useful when exactly the operations that it has are needed, but when other are needed it is difficult to modify because it is not very clear where the lazy values are propagated and where the operations are made.
In normal segment tree on the other hand is very easy to modify the operation because it is in a separate function.
I propose making a similar separation for lazy segment tree.
Probably it wold look something like this: https://github.com/IvanRenison/icpc-team-notebook-el-vasito/blob/update_STree_lazy/data_structures/segment_tree_lazy.cpp (note that that lazy segment tree is different because it is not lazy in memory allocation)

If you are interested in this improvement I can make it (including the tests) and send a pull request.

@IvanRenison IvanRenison changed the title Lazy segment tree is dificult to modiafy for other operations Lazy segment tree is difficult to modify for other operations Jul 14, 2023
@IvanRenison
Copy link
Contributor Author

Does that 👍 mean that you are interested in this improvement?

@BarrensZeppelin
Copy link
Contributor

BarrensZeppelin commented Jul 18, 2023

Does that 👍 mean that you are interested in this improvement?

Indeed. I've opened #216 which is similar.

@IvanRenison
Copy link
Contributor Author

Great!

@IvanRenison IvanRenison linked a pull request Jul 19, 2023 that will close this issue
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 a pull request may close this issue.

2 participants