简体   繁体   English

不相交集数据结构是否在 Java 中原生实现?

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

I searched for a native implementation of the disjoint-set data structure in Java.我在 Java 中搜索了不相交集数据结构的本地实现。 But I didn't find one, only in external libraries .但我没有找到,只在外部库中。

Did I miss it or does it actually not exist?我错过了它还是它实际上不存在?

If there was an implementation of the disjoint-set data structure, it would likely be located in the java.util package.如果存在不相交集数据结构的实现,它可能位于 java.util package 中。 Sets are included, but not disjoint-sets: https://docs.oracle.com/javase/8/docs/api/java/util/package-summary.html .包含集合,但不包含不相交集合: https://docs.oracle.com/javase/8/docs/api/java/util/package-summary.ZFC35FDC70D5FC69D7698Z83A822C

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 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM