Skip to content

Add rectangle apply point get#39

Merged
Harui-i merged 1 commit into
mainfrom
feature/rectangle-add-point-get
Jun 27, 2026
Merged

Add rectangle apply point get#39
Harui-i merged 1 commit into
mainfrom
feature/rectangle-add-point-get

Conversation

@Harui-i

@Harui-i Harui-i commented Jun 27, 2026

Copy link
Copy Markdown
Owner

@codex 日本語でレビュー

@Harui-i
Harui-i force-pushed the feature/rectangle-add-point-get branch from 5ad0b83 to 709d991 Compare June 27, 2026 14:38
@Harui-i
Harui-i requested a review from Copilot June 27, 2026 14:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

作用素側にTimeみたいな時刻情報をもたせれば可換にできる


座標範囲を先に指定し、その範囲内の長方形作用と一点取得をオンラインに処理できます。

作用素 `F` はモノイドとして扱います。

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

作用素側にTimeみたいな時刻情報をもたせれば可換にできる

F id()
```

`composition(f, g)` は ACL の `lazy_segtree` と同じく、作用 `g` の後に作用 `f` を適用する合成、`id()` は単位元です。

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

作用素側にTimeみたいな時刻情報をもたせれば可換にできる

@Harui-i
Harui-i merged commit 7be2604 into main Jun 27, 2026
1 of 2 checks passed
@Harui-i
Harui-i deleted the feature/rectangle-add-point-get branch June 27, 2026 14:44
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.

2 participants