最近我遇到了一種情況,其中集合論和集合數學符合我對這封信所做的事情(認爲有一種更簡單的方法可以完成我所需要的 - 即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. ALL and empty set = TRUE
- 3. GtkRadioButton set active and deactive
- 4. Grep and set -o errexit
- 5. jquery cookie check and set
- 6. Traceroute Theory
- 7. 在xmltype列和子查詢之間執行set theory
- 8. grails(gorm)set contains and persists duplicates
- 9. global-set-key with keycodes and modifiers
- 10. NoSQL/Redis Scaling Theory
- 11. MultinomialNB - Theory vs practice
- 12. up table set number2 = number where number!=「」and set number,number2 = $ number where number =「」;;
- 13. PostSharp 1.5 and .Net 4
- 14. .net memory measuring and profiling
- 15. Set-theory通過SQL確定「組」記錄之間的時間差的方式
- 16. bootstrap-mutliselect data-actions-box =「true」set and not working
- 17. C++:set :: insert with iterators and sets of sets
- 18. Set Telegram bot webhook with multipart/form-data and allowed_updates
- 19. Booksleeve和Redis的Check-and-Set(CAS)操作
- 20. php mysql UPDATE tinyint set selected 1 and rest 0
- 21. Graph Theory - 錦標賽排名
- 22. Z3 .NET中的Set-Logic API
- 23. asp.net c#.net framework 2.0 and 3.5
- 24. 將複雜參數傳遞給[Theory]
- 25. 如何AND與AND條件與.NET中的另一個條件的結果
- 26. NET-SNMP SET請求使用C
- 27. .NET中的「Object reference not set ...」System.Management.Automation.Runspaces.RunspaceBase
- 28. 我的數組數據正在被我的自定義(Set Theory)Complements()函數破壞?
- 29. 運行@Theory註解測試只一次,直到通過
- 30. Sql:「Where」and「And」