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.
112 lines
9.6 KiB
112 lines
9.6 KiB
<HTML><HEAD><TITLE>Microsoft.FSharp.Collections.Array2D</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>.Array2D </h1><br>
|
|
</dd>
|
|
<dt></dt><dd>
|
|
<table>
|
|
<tr valign='top'><td><summary>
|
|
Basic operations on 2-dimensional arrays.
|
|
|
|
F# and .NET multi-dimensional arrays are typically zero-based.
|
|
However, .NET multi-dimensional arrays used in conjunction with external
|
|
libraries (e.g. libraries associated with Visual Basic) be
|
|
non-zero based, using a potentially different base for each dimension.
|
|
The operations in this module will accept such arrays, and
|
|
the basing on an input array will be propogated to a matching output
|
|
array on the <tt>Array2D.map</tt> and <tt>Array2D.mapi</tt> operations.
|
|
Non-zero-based arrays can also be created using <tt>Array2D.zero_create_based</tt>,
|
|
<tt>Array2D.create_based</tt> and <tt>Array2D.init_based</tt>.
|
|
</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 base1 : 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a></pre></td><td><summary>
|
|
Fetch the base-index for the first dimension of the array.
|
|
|
|
See notes on the Array2D module re. zero-basing.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val base2 : 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a></pre></td><td><summary>
|
|
Fetch the base-index for the second dimension of the array.
|
|
|
|
See notes on the Array2D module re. zero-basing.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val blit : 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__unit.html'>unit</a></pre></td><td><summary>
|
|
Read a range of elements from the first array and write them into the second.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val copy : 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a> -> 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a></pre></td><td><summary>
|
|
Build a new array whose elements are the same as the input array.
|
|
|
|
For non-zero-based arrays the basing on an input array will be propogated to the output
|
|
array.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val create : <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> 'T -> 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a></pre></td><td><summary>
|
|
Create an array whose elements are all initially the given value
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val createBased : <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> 'T -> 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a></pre></td><td><summary>
|
|
Create a based array whose elements are all initially the given value
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val get : 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> 'T</pre></td><td><summary>
|
|
Fetch an element from a 2D array. You can also use the syntax 'array.[index1,index2]'
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val init : <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> (<a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> 'T) -> 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a></pre></td><td><summary>
|
|
Create an array given the dimensions and a generator function to compute the elements.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val initBased : <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> (<a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> 'T) -> 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a></pre></td><td><summary>
|
|
Create a based array given the dimensions and a generator function to compute the elements.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val iter : ('T -> <a href='Microsoft.FSharp.Core.type__unit.html'>unit</a>) -> 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a> -> <a href='Microsoft.FSharp.Core.type__unit.html'>unit</a></pre></td><td><summary>
|
|
Apply the given function to each element of the array.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val iteri : (<a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> 'T -> <a href='Microsoft.FSharp.Core.type__unit.html'>unit</a>) -> 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a> -> <a href='Microsoft.FSharp.Core.type__unit.html'>unit</a></pre></td><td><summary>
|
|
Apply the given function to each element of the array. The integer indicies passed to the
|
|
function indicates the index of element.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val length1 : 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a></pre></td><td><summary>
|
|
Return the length of an array in the first dimension
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val length2 : 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a></pre></td><td><summary>
|
|
Return the length of an array in the second dimension
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val map : ('T -> 'U) -> 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a> -> 'U <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a></pre></td><td><summary>
|
|
Build a new array whose elements are the results of applying the given function
|
|
to each of the elements of the array.
|
|
|
|
For non-zero-based arrays the basing on an input array will be propogated to the output
|
|
array.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val mapi : (<a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> 'T -> 'U) -> 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a> -> 'U <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a></pre></td><td><summary>
|
|
Build a new array whose elements are the results of applying the given function
|
|
to each of the elements of the array. The integer indices passed to the
|
|
function indicates the element being transformed.
|
|
|
|
For non-zero-based arrays the basing on an input array will be propogated to the output
|
|
array.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val rebase : 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a> -> 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a></pre></td><td><summary>
|
|
Build a new array whose elements are the same as the input array but
|
|
where a non-zero-based input array generates a corresponding zero-based
|
|
output array.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val set : 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> 'T -> <a href='Microsoft.FSharp.Core.type__unit.html'>unit</a></pre></td><td><summary>
|
|
Set the value of an element in an array. You can also use the syntax 'array.[index1,index2] <- value'
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val zeroCreate : <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a></pre></td><td><summary>
|
|
Create an array where the entries are initially Unchecked.defaultof<'T>.
|
|
</summary></td></tr>
|
|
<tr valign="top"><td><pre>val zeroCreateBased : <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> <a href='Microsoft.FSharp.Core.type__int.html'>int</a> -> 'T <a href='../FSharp.Core/Microsoft.FSharp.Core.type__[,]-1.html'>[,]</a></pre></td><td><summary>
|
|
Create a based array where the entries are initially Unchecked.defaultof<'T>.
|
|
</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>
|
|
|