Skip to content

Refactor node set unify rebuild#1

Open
luomojim wants to merge 1 commit intoSouthSea-A:mainfrom
luomojim:refactor-unify-node-set
Open

Refactor node set unify rebuild#1
luomojim wants to merge 1 commit intoSouthSea-A:mainfrom
luomojim:refactor-unify-node-set

Conversation

@luomojim
Copy link
Copy Markdown

@luomojim luomojim commented May 2, 2026

No description provided.

@luomojim
Copy link
Copy Markdown
Author

luomojim commented May 2, 2026

概要

  • 重写 unify_node_set(),改为通过临时 node_set 重建路径节点。
  • unify() 后清空 node_set_free,去除删除产生的空洞。
  • 保持路径内容不变,同时按“前驱位置 + 当前节点编号”最大化共享。
  • 新增 smoke test,覆盖共享前缀、重复路径和存在空洞的节点集合。

测试

  • g++ -std=c++17 -Wall -Wextra -pedantic tests\smoke_unify.cpp -o tests\smoke_unify.exe
  • .\tests\smoke_unify.exe

测试通过。编译时仍有一些原项目已有的 deprecated-copy warning。

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.

1 participant