最近我遇到了一種情況,其中集合論和集合數學符合我對這封信所做的事情(認爲有一種更簡單的方法可以完成我所需要的 - 即LINQ--但我並不認爲那時候)。但是我不知道任何通用集庫。授予IEnumerables提供了一些設置操作(聯盟等),但沒有像交集或設置比較。任何人都可以指出適合這裏的東西嗎?使用泛型實現集合數學的東西?Set Theory and .NET
6
A
回答
6
在框架(3.5+)中有HashSet<T>
可以滿足您的需求。 .NET 4還引入了SortedSet<T>
和一個通用接口ISet<T>
。
1
System.Collections.Generic.HashSet擁有一批集操作,包括子集,超集,交集,聯盟等
http://msdn.microsoft.com/en-us/library/bb359438.aspx
我希望這有助於
喬
相關問題
- 1. Set TCP_QUICKACK and TCP_NODELAY
- 2. GtkRadioButton set active and deactive
- 3. ALL and empty set = TRUE
- 4. jquery cookie check and set
- 5. Traceroute Theory
- 6. global-set-key with keycodes and modifiers
- 7. MultinomialNB - Theory vs practice
- 8. up table set number2 = number where number!=「」and set number,number2 = $ number where number =「」;;
- 9. bootstrap-mutliselect data-actions-box =「true」set and not working
- 10. Set Telegram bot webhook with multipart/form-data and allowed_updates
- 11. Booksleeve和Redis的Check-and-Set(CAS)操作
- 12. .net memory measuring and profiling
- 13. PostSharp 1.5 and .Net 4
- 14. Graph Theory - 錦標賽排名
- 15. Z3 .NET中的Set-Logic API
- 16. asp.net c#.net framework 2.0 and 3.5
- 17. 我的數組數據正在被我的自定義(Set Theory)Complements()函數破壞?
- 18. NET-SNMP SET請求使用C
- 19. Sql:「Where」and「And」
- 20. rails and rmagick and webfaction
- 21. LINQ查詢AND&OR
- 22. Boost hana find set in set
- 23. LinkedList,First and Last
- 24. activerecord/db theory - 我在哪裏放這些字段?
- 25. 使用Assert.That(而不是假設)與[Theory]是否是錯誤的?
- 26. apns and asp.net
- 27. $ this_array = array(「this」,「and」,「this」,「and」,「th」)
- 28. VBscsript「SET」問題
- 29. LINQ Union and Distinct
- 30. TWiki,Mail and Proxies&gmail