diff options
author | Thomas Bushnell, BSG <tb@debian.org> | 2005-11-02 14:55:21 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:32 -0800 |
commit | 34c54a22ff7818bb8b38ef4d9c87dbbcb221ba73 (patch) | |
tree | 1189d06a81277bcf8539b0260a69a19f6038effb /subarray.txi | |
parent | 611b3db17894e5fdc0db3d49eaf6743d27b44233 (diff) | |
parent | 5145dd3aa0c02c9fc496d1432fc4410674206e1d (diff) | |
download | slib-34c54a22ff7818bb8b38ef4d9c87dbbcb221ba73.tar.gz slib-34c54a22ff7818bb8b38ef4d9c87dbbcb221ba73.zip |
Import Debian changes 3a2-1debian/3a2-1
slib (3a2-1) unstable; urgency=low
* New upstream release.
* Acknowledge NMU. (Closes: #281809)
* Makefile: Don't hack Makefile; use rules instead.
* debian/rules: Set on make invocations: prefix, htmldir, TEXI2HTML.
* debian/rules (clean): Clean more stuff here.
* Makefile: Comment out old rule for $(htmldir)slib_toc.html. Instead,
specify directly that the texi2html invocation produces that file.
* debian/rules (binary-indep): Find web files in slib subdir.
* debian/control (Build-Depends-Indep): Go back to using scm.
Diffstat (limited to 'subarray.txi')
-rw-r--r-- | subarray.txi | 42 |
1 files changed, 8 insertions, 34 deletions
diff --git a/subarray.txi b/subarray.txi index 7d62ed6..1a0545f 100644 --- a/subarray.txi +++ b/subarray.txi @@ -36,31 +36,12 @@ shared. @end example @end defun -@defun subarray0 array select @dots{} -Behaves like @r{subarray}, but @r{align}s the returned array origin to -0 @dots{}. -@end defun - -@defun array-align array coord @dots{} +@defvar subarray0 +Legacy alias for @r{subarray}. +@end defvar -Returns an array shared with @var{array} but with a different origin. The @var{coords} -are the exact integer coordinates of the new origin. Indexes -corresponding to missing or #f coordinates are not realigned. - -For example: -@example -(define ra2 (create-array '#(5) '(5 9) '(-4 0))) -(array-shape ra2) @result{} ((5 9) (-4 0)) -(array-shape (array-align ra2 0 0)) @result{} ((0 4) (0 4)) -(array-shape (array-align ra2 0)) @result{} ((0 4) (-4 0)) -(array-shape (array-align ra2)) @result{} ((5 9) (-4 0)) -(array-shape (array-align ra2 0 #f)) @result{} ((0 4) (-4 0)) -(array-shape (array-align ra2 #f 0)) @result{} ((5 9) (0 4)) -@end example -@end defun - @defun array-trim array trim @dots{} @@ -73,22 +54,15 @@ bound. For example: @example -(array-trim '#(0 1 2 3 4) 1) @result{} #1A(1 2 3 4) ;; shape is ((0 3)) -(array-trim '#(0 1 2 3 4) -1) @result{} #1A(0 1 2 3) ;; shape is ((1 4)) +(array-trim '#(0 1 2 3 4) 1) @result{} #1A(1 2 3 4) +(array-trim '#(0 1 2 3 4) -1) @result{} #1A(0 1 2 3) (require 'array-for-each) (define (centered-difference ra) - (array-map - (array-trim ra 1) (array-trim ra -1))) -(define (forward-difference ra) - (array-map - (array-trim ra 1) ra)) -(define (backward-difference ra) - (array-map - ra (array-trim ra -1))) + (array-map ra - (array-trim ra 1) (array-trim ra -1))) (centered-difference '#(0 1 3 5 9 22)) - @result{} #1A(3 4 6 17) ;;shape is ((1 4)) -(backward-difference '#(0 1 3 5 9 22)) - @result{} #1A(1 2 2 4 13) ;; shape is ((1 5)) -(forward-difference '#(0 1 3 5 9 22)) - @result{} #(1 2 2 4 13) ;; shape is ((0 4)) + @result{} #(1 2 2 4 13) @end example @end defun + |