AgedLookup<'Token, 'Key, 'Value> Type
Simple aging lookup table. When a member is accessed it's moved to the top of the list and when there are too many elements the least-recently-accessed element falls of the end. - areSimilar: Keep at most once association for two similar keys (as given by areSimilar)
Constructors
Constructor |
Description
|
Full Usage:
AgedLookup(keepStrongly, areSimilar, ?requiredToKeep, ?keepMax)
Parameters:
int
areSimilar : 'Key * 'Key -> bool
?requiredToKeep : 'Value -> bool
?keepMax : int
Returns: AgedLookup<'Token, 'Key, 'Value>
|
|
Instance members
Instance member |
Description
|
Full Usage:
this.Clear
Parameters:
'Token
|
Remove all elements.
|
Full Usage:
this.Put
Parameters:
'Token
arg1 : 'Key
arg2 : 'Value
|
Add an element to the collection. Make it the most recent.
|
Full Usage:
this.Remove
Parameters:
'Token
key : 'Key
|
Remove the given value from the collection.
|
Full Usage:
this.Resize
Parameters:
'Token
newKeepStrongly : int
?newKeepMax : int
|
Resize
|
Full Usage:
this.TryGet
Parameters:
'Token
key : 'Key
Returns: 'Value option
|
Lookup a value and make it the most recent. Return
|
Full Usage:
this.TryGetKeyValue
Parameters:
'Token
key : 'Key
Returns: ('Key * 'Value) option
|
Lookup a value and make it the most recent. Returns the original key value because the areSame function may have unified two different keys.
|
Full Usage:
this.TryPeekKeyValue
Parameters:
'Token
key : 'Key
Returns: ('Key * 'Value) option
|
Lookup the value without making it the most recent. Returns the original key value because the areSame function may have unified two different keys.
|