data-structures - 使用 F# 联合查找

标签 data-structures f#

关于 F# 中可用的数据结构
disjoint set data structures 是否有任何“官方”实现?比如 Union find 的实现?

我在 Google 上所能找到的就是这里的片段:

Weighted Quick-Union with Path Compression

请注意,我是 F# 和编程的初学者。
什么是有效的替代方案?

最佳答案

F# 数据结构

Regarding data structures available in F# is there any "official" implementation of disjoint set data structures like implementations of Union find ?

我不知道任何官方版本。

最著名的 F# 数据结构来源:

曾经有 F# PowerPack这是一个包含大量有用代码的文件,但现在已被分解成多个部分。

查看 Jack Fox's post获取有关 F# 数据结构的重要信息。

对于特定领域的数据结构,请搜索 F# community projects .

专用于合并/查找:

Handbook of Practical Logic and Automated Reasoninglib.ml
John Harrison 定义了 equatecanonize

在 F# 翻译中 lib.fs它们仍然是等同canonize

并且来自 notes翻译过程中:

参见:Disjoint-set data structure
请参阅:Topics in Automated Deduction - Lecture 5 - Page 4: Union/Find

union 被称为equate
find 被称为canonize

What would be the efficient alternatives ?

我不知道 John Harrison 的代码是否更有效率,因为我没有运行任何测试。我也不知道任何其他实现,但我知道该版本作为自动定理证明器的核心部分可以正常工作。

关于data-structures - 使用 F# 联合查找,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34694486/

相关文章:

algorithm - 用于查找自由树中两个节点之间最长距离的线性时间算法?

f# - 如何实现静态解析的类型参数?

.net - 使用 List.collect f#

algorithm - 就地最小最大树失效问题

java - 在 Java 集合排序中使用 Comparator 接口(interface)比较方法返回值 -1, 0, 1 到底意味着什么?

f# - 是否可以对受歧视联合的基础形状进行模式匹配?

f# - 如何在博客中添加 F# 语法高亮

interface - 如何使用 F# 在记录结构上定义 fmap

c++ - 内存布局 : 2D N*M data as pointer to N*M buffer or as array of N pointers to arrays

java - 使用静态方法检查二叉树是否是二叉搜索树