csharpfftfsharpintegrationinterpolationlinear-algebramathdifferentiationmatrixnumericsrandomregressionstatisticsmathnet
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
128 lines
11 KiB
128 lines
11 KiB
<HTML><HEAD><TITLE>Microsoft.FSharp.Collections.Map</TITLE><link rel="stylesheet" type="text/css"href="../msdn.css"></link></HEAD><BODY>
|
|
<br><dl>
|
|
<dt></dt><dd>
|
|
<h1>[<a href='../namespaces.html'>Home</a>] Module <a href='Microsoft.FSharp.Collections.html'>Microsoft.FSharp.Collections</a>.Map </h1><br>
|
|
</dd>
|
|
<dt></dt><dd>
|
|
<table>
|
|
<tr valign='top'><td><summary>
|
|
Functional programming operators related to the <tt>Map<_,_></tt> type.
|
|
</summary>
|
|
<dt><h3>Values</h3></dt><dd>
|
|
<table width="100%%">
|
|
<tr><th width=60%>Value</th><th>Description</th></tr>
|
|
<tr valign="top"><td><pre>val add : 'Key -> 'T -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T></pre></td><td><summary>
|
|
Return a new map with the binding added to the given map.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val contains : 'Key -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> <a href='Microsoft.FSharp.Core.type__bool.html'>bool</a></pre></td><td><summary>
|
|
Test is an element is in the domain of the map
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>[<<a href='Microsoft.FSharp.Core.type_GeneralizableValueAttribute.html'>GeneralizableValueAttribute</a> ()>]
|
|
val empty<'Key,'T> : <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T></pre></td><td><summary>
|
|
The empty map
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val exists : ('Key -> 'T -> <a href='Microsoft.FSharp.Core.type__bool.html'>bool</a>) -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> <a href='Microsoft.FSharp.Core.type__bool.html'>bool</a></pre></td><td><summary>
|
|
Return true if the given predicate returns true for one of the
|
|
bindings in the map.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val filter : ('Key -> 'T -> <a href='Microsoft.FSharp.Core.type__bool.html'>bool</a>) -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T></pre></td><td><summary>
|
|
Build a new map containing only the bindings for which the given predicate returns 'true'
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val find : 'Key -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> 'T</pre></td><td><summary>
|
|
Lookup an element in the map, raising <tt>KeyNotFoundException</tt> if no binding
|
|
exists in the map.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val findIndex : ('Key -> 'T -> <a href='Microsoft.FSharp.Core.type__bool.html'>bool</a>) -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> 'Key</pre></td><td><summary>
|
|
Evaluates the function on each mapping in the collection. Returns the key for the first mapping
|
|
where the function returns 'true'. Raise <tt>KeyNotFoundException</tt> if no such element exists.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val fold :
|
|
('State -> 'Key -> 'T -> 'State) -> 'State -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> 'State</pre></td><td><summary>
|
|
Fold over the bindings in the map
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val foldBack :
|
|
('Key -> 'T -> 'State -> 'State) -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> 'State -> 'State</pre></td><td><summary>
|
|
Fold over the bindings in the map
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val forall : ('Key -> 'T -> <a href='Microsoft.FSharp.Core.type__bool.html'>bool</a>) -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> <a href='Microsoft.FSharp.Core.type__bool.html'>bool</a></pre></td><td><summary>
|
|
Return true if the given predicate returns true for all of the
|
|
bindings in the map.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>[<<a href='Microsoft.FSharp.Core.type_OCamlCompatibilityAttribute.html'>OCamlCompatibilityAttribute</a>
|
|
("This F# library function has been renamed. Use 'isEmpty' instead")>]
|
|
val is_empty : <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> <a href='Microsoft.FSharp.Core.type__bool.html'>bool</a></pre></td><td></td></tr>
|
|
<tr valign="top"><td><pre>val isEmpty : <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> <a href='Microsoft.FSharp.Core.type__bool.html'>bool</a></pre></td><td><summary>
|
|
Is the map empty?
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val iter : ('Key -> 'T -> <a href='Microsoft.FSharp.Core.type__unit.html'>unit</a>) -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> <a href='Microsoft.FSharp.Core.type__unit.html'>unit</a></pre></td><td><summary>
|
|
Apply the given function to each binding in the dictionary
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val map : ('Key -> 'T -> 'U) -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'U></pre></td><td><summary>
|
|
Build a new collection whose elements are the results of applying the given function
|
|
to each of the elements of the collection. The index passed to the
|
|
function indicates the index of element being transformed.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>[<<a href='Microsoft.FSharp.Core.type_OCamlCompatibilityAttribute.html'>OCamlCompatibilityAttribute</a>
|
|
("This F# library function has been renamed. Use 'contains' instead")>]
|
|
val mem : 'Key -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> <a href='Microsoft.FSharp.Core.type__bool.html'>bool</a></pre></td><td></td></tr>
|
|
<tr valign="top"><td><pre>val of_array : ('Key * 'T) <a href='Microsoft.FSharp.Core.type__array-1.html'>array</a> -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T></pre></td><td><summary>
|
|
Return a new map made from the given bindings
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val of_list : ('Key * 'T) <a href='Microsoft.FSharp.Collections.type__list-1.html'>list</a> -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T></pre></td><td><summary>
|
|
Return a new map made from the given bindings
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val of_seq : <a href='Microsoft.FSharp.Collections.type__seq-1.html'>seq</a><'Key * 'T> -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T></pre></td><td><summary>
|
|
Return a new map made from the given bindings
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val partition :
|
|
('Key -> 'T -> <a href='Microsoft.FSharp.Core.type__bool.html'>bool</a>) ->
|
|
<a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> * <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T></pre></td><td><summary>
|
|
Build two new maps, one containing the bindings for which the given predicate returns 'true',
|
|
and the other the remaining bindings.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val pick : ('Key -> 'T -> 'U <a href='Microsoft.FSharp.Core.type__option-1.html'>option</a>) -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> 'U</pre></td><td><summary>
|
|
Search the map looking for the first element where the given function returns a <tt>Some</tt> value
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val remove : 'Key -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T></pre></td><td><summary>
|
|
Remove an element from the domain of the map. No exception is raised if the element is not present.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val to_array : <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> ('Key * 'T) <a href='Microsoft.FSharp.Core.type__array-1.html'>array</a></pre></td><td><summary>
|
|
Returns an array of all key-value pairs in the mappinng
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val to_list : <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> ('Key * 'T) <a href='Microsoft.FSharp.Collections.type__list-1.html'>list</a></pre></td><td><summary>
|
|
Returns a list of all key-value pairs in the mappinng
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val to_seq : <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> <a href='Microsoft.FSharp.Collections.type__seq-1.html'>seq</a><'Key * 'T></pre></td><td><summary>
|
|
View the collection as an enumerable sequence. This collection
|
|
type is also directly compatible with 'seq<KeyValuePair<_,_> >'.
|
|
|
|
Note this function returns a sequence of tuples, whereas the collection
|
|
itself is compatible with the logically equivalent sequence of KeyValuePairs.
|
|
Using sequences of tuples tends to be more convenient in F#, however the
|
|
collection itself must enumerate KeyValuePairs to conform to the .NET
|
|
design guidelines and the IDictionary interface.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val tryFind : 'Key -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> 'T <a href='Microsoft.FSharp.Core.type__option-1.html'>option</a></pre></td><td><summary>
|
|
Lookup an element in the map, returning a <tt>Some</tt> value if the element is in the domain
|
|
of the map and <tt>None</tt> if not.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val tryFindIndex : ('Key -> 'T -> <a href='Microsoft.FSharp.Core.type__bool.html'>bool</a>) -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> 'Key <a href='Microsoft.FSharp.Core.type__option-1.html'>option</a></pre></td><td><summary>
|
|
Return the key of the first mapping in the collection that satisfies the given predicate.
|
|
Return 'None' if no such element exists.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val tryPick : ('Key -> 'T -> 'U <a href='Microsoft.FSharp.Core.type__option-1.html'>option</a>) -> <a href='Microsoft.FSharp.Collections.type_Map-2.html'>Map</a><'Key,'T> -> 'U <a href='Microsoft.FSharp.Core.type__option-1.html'>option</a></pre></td><td><summary>
|
|
Search the map looking for the first element where the given function returns a <tt>Some</tt> value
|
|
</summary></td></tr>
|
|
|
|
</table>
|
|
</dd>
|
|
</td></tr>
|
|
<tr valign='top'><td>
|
|
<dt><h3>See Also</h3></dt><dd>
|
|
<a href="Microsoft.FSharp.Collections.html">Microsoft.FSharp.Collections</a> </dd>
|
|
</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<br /> <br/><p><i>Documentation for assembly FSharp.Core, version 1.9.6.16, generated using <a href='http://research.microsoft.com/fsharp/'>F# Programming Language</a> version 1.9.6.16</i></p>
|
|
</BODY></HTML>
|
|
|