在编程中使用集合论和数组
我想知道任何编程语言中是否都有允许您测试集合论的函数。例如,可以在大型集合上执行组合的库或一系列不错的算法。
我不需要基本的推送/弹出功能,我想知道哪些编程语言存在用于 UNION CONCAT INTERSECTIONS 和 Compliments 等函数的库,以及 100k+ 元素集的子集比较。
我知道这听起来像一个数学问题......也许不是,但我更多地寻找一种旨在快速处理大型集合的编程语言,因为我知道我的算法会很慢。
I was wondering if there are functions in any programming languages that allow you to test set theory. For example a library or series of decent algorithms that can perform Combinatorics on large sets.
I don't need basic push/pop I would like to know for what programming languages do libraries exist for functions like UNION CONCAT INTERSECTIONS and Compliments, and comparison of sub sets for 100k+ element sets.
I know this sounds like a math question... maybe not but I am more looking for a Programming language that is designed to handle large sets quickly, because I know my algorithms will be slow.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
标准 Python
set
type 提供了这些操作。不能保证速度符合您的需要,因为您没有说明您的性能要求。The standard Python
set
type provides these operations. No guarantees that the speed will be what you need, since you haven't stated your performance requirements.....
....
你可以使用Scala,它对集合有很好的支持!例如:
还有适合特定问题的不同实现,它们是 SortedSet、BitSet、HashSet 等。
You can use Scala, it has great support of sets! For example:
Also different implementations that good for particular issues, they are SortedSet, BitSet, HashSet and etc.