diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:31 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:31 -0800 |
commit | 5145dd3aa0c02c9fc496d1432fc4410674206e1d (patch) | |
tree | 540afc30c51da085f5bd8ec3f4c89f6496e7900d /arraymap.txi | |
parent | 8466d8cfa486fb30d1755c4261b781135083787b (diff) | |
download | slib-5145dd3aa0c02c9fc496d1432fc4410674206e1d.tar.gz slib-5145dd3aa0c02c9fc496d1432fc4410674206e1d.zip |
Import Upstream version 3a2upstream/3a2
Diffstat (limited to 'arraymap.txi')
-rw-r--r-- | arraymap.txi | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arraymap.txi b/arraymap.txi index f10ad65..2547eaf 100644 --- a/arraymap.txi +++ b/arraymap.txi @@ -12,6 +12,7 @@ as the corresponding element in @var{array0}. The value returned is unspecified. The order of application is unspecified. @end deffn + @defun array-map prototype proc array1 array2 @dots{} @var{array2}, @dots{} must have the same number of dimensions as @@ -23,12 +24,14 @@ new array of type @var{prototype}. The new array is returned. The order of application is unspecified. @end defun + @defun array-for-each proc array0 @dots{} @var{proc} is applied to each tuple of elements of @var{array0} @dots{} in row-major order. The value returned is unspecified. @end defun + @defun array-indexes array Returns an array of lists of indexes for @var{array} such that, if @@ -37,6 +40,7 @@ Returns an array of lists of indexes for @var{array} such that, if @var{li})). @end defun + @deffn {Procedure} array-index-map! array proc applies @var{proc} to the indices of each element of @var{array} in @@ -46,7 +50,7 @@ returned and the order of application are unspecified. One can implement @var{array-indexes} as @example (define (array-indexes array) - (let ((ra (apply create-array '#() (array-shape array)))) + (let ((ra (apply make-array '#() (array-dimensions array)))) (array-index-map! ra (lambda x x)) ra)) @end example @@ -59,10 +63,12 @@ Another example: @end example @end deffn -@deffn {Procedure} array-copy! source destination + +@deffn {Procedure} array:copy! destination source Copies every element from vector or array @var{source} to the corresponding element of @var{destination}. @var{destination} must have the same rank as @var{source}, and be at least as large in each dimension. The order of copying is unspecified. @end deffn + |