Add rectangle apply point get#39
Merged
Merged
Conversation
Harui-i
force-pushed
the
feature/rectangle-add-point-get
branch
from
June 27, 2026 14:38
5ad0b83 to
709d991
Compare
There was a problem hiding this comment.
Pull request overview
長方形領域への作用(更新)をオンラインに処理し、任意の一点に掛かっている作用素を取得するための新しいデータ構造 rectangle_apply_point_get を追加するPRです。ライブラリとして 2D の range-apply / point-get を提供し、yosupo 検証とドキュメントも併せて整備しています。
Changes:
structure/rectangle_apply_point_get.hppを新規追加(長方形作用・一点取得)- ドキュメント
docs/structure/rectangle-apply-point-get.mdを新規追加 - yosupo
rectangle_add_point_getの verify テストを新規追加
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| test/verify/structure/yosupo-rectangle-add-point-get.test.cpp | yosupo の rectangle_add_point_get で新構造を検証するテストを追加 |
| structure/rectangle_apply_point_get.hpp | 長方形への作用を蓄積し、点クエリで取得するデータ構造本体を追加 |
| docs/structure/rectangle-apply-point-get.md | 追加したデータ構造の概要・API・計算量をドキュメント化 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+7
to
+8
| template <class F, F (*composition)(F, F), F (*id)(), class T = int> | ||
| struct rectangle_apply_point_get { |
Owner
Author
There was a problem hiding this comment.
作用素側にTimeみたいな時刻情報をもたせれば可換にできる
|
|
||
| 座標範囲を先に指定し、その範囲内の長方形作用と一点取得をオンラインに処理できます。 | ||
|
|
||
| 作用素 `F` はモノイドとして扱います。 |
Owner
Author
There was a problem hiding this comment.
作用素側にTimeみたいな時刻情報をもたせれば可換にできる
| F id() | ||
| ``` | ||
|
|
||
| `composition(f, g)` は ACL の `lazy_segtree` と同じく、作用 `g` の後に作用 `f` を適用する合成、`id()` は単位元です。 |
Owner
Author
There was a problem hiding this comment.
作用素側にTimeみたいな時刻情報をもたせれば可換にできる
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.
@codex 日本語でレビュー