HashIdentity.LimitedStructural<'T> 函式 (F#)
實作結構的雜湊,限制為雜湊固定的數目的項目。
命名空間/模組路徑: Microsoft.FSharp.Collections.HashIdentity
組件:FSharp.Core (在 FSharp.Core.dll 中)
// Signature:
LimitedStructural : int -> IEqualityComparer<'T> (requires equality)
// Usage:
LimitedStructural limit
參數
limit
型別:int雜湊的項目最大數目。
傳回值
物件實作 IEqualityComparer使用 有限的雜湊。
備註
雜湊遞迴結構會藉由結合每個其組成元件的雜湊,來撰寫結構化物件的雜的湊。 因此,如果您 20000 的項目所組成的清單的每個元素的雜湊會撰寫成清單的雜湊。
若要節省時間,並降低風險的堆疊溢位時雜湊有限的雜湊可讓您指定所要考慮當建構雜湊透過結構化資料的項目數量的上限。 因此,如果您會雜湊 20000 的項目清單,就可以使用其先 18 的項目。
LimitedStructural使用limitedHash 函式.
平台
Windows 7、Windows Vista SP2、Windows XP SP3、Windows XP x64 SP2、Windows Server 2008 R2、Windows Server 2008 SP2、Windows Server 2003 SP2
版本資訊
F# 執行階段
支援版本:2.0、4.0
Silverlight
支援版本:3