Next: Array Interpolation, Previous: Subarrays, Up: Data Structures [Contents][Index]
array1, … must have the same number of dimensions as array0 and have a range for each index which includes the range for the corresponding index in array0. proc is applied to each tuple of elements of array1 … and the result is stored as the corresponding element in array0. The value returned is unspecified. The order of application is unspecified.
array2, … must have the same number of dimensions as array1 and have a range for each index which includes the range for the corresponding index in array1. proc is applied to each tuple of elements of array1, array2, … and the result is stored as the corresponding element in a new array of type prototype. The new array is returned. The order of application is unspecified.
proc is applied to each tuple of elements of array0 … in row-major order. The value returned is unspecified.
Returns an array of lists of indexes for array such that, if li is a list of indexes for which array is defined, (equal? li (apply array-ref (array-indexes array) li)).
applies proc to the indices of each element of array in turn. The value returned and the order of application are unspecified.
One can implement array-index-map! as
(define (array-index-map! ra fun) (array-index-for-each ra (lambda is (apply array-set! ra (apply fun is) is))))
applies proc to the indices of each element of array in turn, storing the result in the corresponding element. The value returned and the order of application are unspecified.
One can implement array-indexes as
(define (array-indexes array) (let ((ra (apply make-array '#() (array-dimensions array)))) (array-index-map! ra (lambda x x)) ra))
Another example:
(define (apl:index-generator n) (let ((v (make-vector n 1))) (array-index-map! v (lambda (i) i)) v))
Copies every element from vector or array source to the corresponding element of destination. destination must have the same rank as source, and be at least as large in each dimension. The order of copying is unspecified.
Next: Array Interpolation, Previous: Subarrays, Up: Data Structures [Contents][Index]