英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论