skills/skills.volces.com/pywayne-data-structure

pywayne-data-structure

Installation
SKILL.md

Pywayne Data Structure

数据结构工具集,提供逻辑条件树、并查集和 XML 文件读写功能。

Quick Start

from pywayne.data_structure import ConditionTree, UnionFind, XmlIO

# 逻辑条件树
tree = ConditionTree("root")
tree.append_by_path([{'tag': 'if', 'attrib': {}, 'text': '条件1'}])
tree.append_by_path([{'tag': 'else', 'attrib': {}, 'text': '条件2'}])

# 并查集操作
uf = UnionFind(10)
rep = uf.find(3)  # 返回集合标识
uf.union(1, 2)  # 合并两个集合
Installs
3
First Seen
Apr 20, 2026
pywayne-data-structure from skills.volces.com