在Java中是否本地实现了不相交集合数据结构?

huangapple go评论82阅读模式
英文:

Is the disjoint-set data structure implemented natively in Java?

问题

我在Java中搜索了不相交集数据结构的本地实现。但我没有找到,只有在外部库中找到了。我是否错过了它,还是它实际上并不存在?

英文:

I searched for a native implementation of the disjoint-set data structure in Java. But I didn't find one, only in external libraries.

Did I miss it or does it actually not exist?

答案1

得分: 0

如果存在不相交集合数据结构的实现,可能会位于java.util包中。该包中包括了集合,但不包括不相交集合:https://docs.oracle.com/javase/8/docs/api/java/util/package-summary.html。

我找到的最接近的是java.util.collections类中的disjoint方法:https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/util/Collections.html#disjoint%28java.util.Collection,java.util.Collection%29

英文:

If there was an implementation of the disjoint-set data structure, it would likely be located in the java.util package. Sets are included, but not disjoint-sets: https://docs.oracle.com/javase/8/docs/api/java/util/package-summary.html.

The closest I found was the disjoint method in the java.util.collections class: https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/util/Collections.html#disjoint%28java.util.Collection,java.util.Collection%29

huangapple
  • 本文由 发表于 2020年4月6日 03:50:10
  • 转载请务必保留本文链接:https://go.coder-hub.com/61048568.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定