Drop point-update sparse segment tree from the PDF - #22
Draft
frex-e wants to merge 2 commits into
Draft
Conversation
SparseLazy already covers point updates as a degenerate range (ql=qr), so the extra implicit tree is not worth a column in the 25-page notebook. Keep the header in-repo (site toggle) like UnionFind. Co-authored-by: shadeditor <shadeditor@gmail.com>
ql=qr is the replacement for the PDF-excluded point-update implicit tree. Co-authored-by: shadeditor <shadeditor@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The point-update implicit tree (
SparseSegmentTree.h) is not needed in the printed notebook.SparseLazySegmentTreealready does point updates as a degenerate range (ql == qr). Offline, coordinate compression plus the denseSegmentTree/ Fenwick covers the same “sparse indices” case. Four segment trees is a lot of column for 25 pages; this is the same reasonUnionFindstays commented out next toUnionFindRollback.The header and its stress test stay in the repo. The snippets site hides it by default (show-excluded toggle), same as other PDF-excluded snippets. The lazy tree description now notes the
ql=qrpoint-update usage, and the lazy stress test covers a point update on a large domain.Walkthrough
\kactlimport{SparseSegmentTree.h}in the data-structures chapter.SparseLazySegmentTree.ql=qron the lazy implicit tree.Verified:
make test-compiles(144/144),make test(90/90),make test-preprocess,make web-pdf.