summaryrefslogtreecommitdiffstats
path: root/array.txi
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2005-01-10 08:53:33 +0000
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:30 -0800
commite33f9eb9cf5cc29c36ce2aa7e10cd0f37ae0cc8e (patch)
treeabbf06041619e445f9d0b772b0d58132009d8234 /array.txi
parentf559c149c83da84d0b1c285f0298c84aec564af9 (diff)
parent8466d8cfa486fb30d1755c4261b781135083787b (diff)
downloadslib-e33f9eb9cf5cc29c36ce2aa7e10cd0f37ae0cc8e.tar.gz
slib-e33f9eb9cf5cc29c36ce2aa7e10cd0f37ae0cc8e.zip
Import Debian changes 3a1-4.2debian/3a1-4.2
slib (3a1-4.2) unstable; urgency=low * Non-maintainer upload. * Add guile.init.local for use within the build dir, since otherwise we have an (earlier unnoticed) circular build-dep due to a difference between scm and guile. slib (3a1-4.1) unstable; urgency=low * Non-maintainer upload. * Build-depend on guile-1.6 instead of scm, since the new version of scm is wedged in unstable (closes: #281809). slib (3a1-4) unstable; urgency=low * Also check for expected creation on slibcat. (Closes: #240096) slib (3a1-3) unstable; urgency=low * Also check for /usr/share/guile/1.6/slib before installing for guile 1.6. (Closes: #239267) slib (3a1-2) unstable; urgency=low * Add format.scm back into slib until gnucash stops using it. * Call guile-1.6 new-catalog (Closes: #238231) slib (3a1-1) unstable; urgency=low * New upstream release * Remove Info section from doc-base file (Closes: #186950) * Remove period from end of description (linda, lintian) * html gen fixed upstream (Closes: #111778) slib (2d4-2) unstable; urgency=low * Fix url for upstream source (Closes: #144981) * Fix typo in slib.texi (enquque->enqueue) (Closes: #147475) * Add build depends. slib (2d4-1) unstable; urgency=low * New upstream. slib (2d3-1) unstable; urgency=low * New upstream. * Remove texi2html call in debian/rules. Now done upstream. Add make html instead. * Changes to rules and doc-base to conform to upstream html gen * Clean up upstream makefile to make sure it cleans up after itself.
Diffstat (limited to 'array.txi')
-rw-r--r--array.txi136
1 files changed, 126 insertions, 10 deletions
diff --git a/array.txi b/array.txi
index 5d30b19..bb09e16 100644
--- a/array.txi
+++ b/array.txi
@@ -23,15 +23,131 @@ Returns @code{#t} if @var{array1} and @var{array2} have the same rank and shape
corresponding elements of @var{array1} and @var{array2} are @code{equal?}.
@example
-(array=? (make-array 'foo 3 3) (make-array 'foo '(0 2) '(1 2)))
+(array=? (create-array '#(foo) 3 3)
+ (create-array '#(foo) '(0 2) '(0 2)))
@result{} #t
@end example
@end defun
-@defun make-array initial-value bound1 bound2 @dots{}
+@defun create-array prototype bound1 bound2 @dots{}
-Creates and returns an array with dimensions @var{bound1},
-@var{bound2}, @dots{} and filled with @var{initial-value}.
+
+Creates and returns an array of type @var{prototype} with dimensions @var{bound1}, @var{bound2},
+@dots{} and filled with elements from @var{prototype}. @var{prototype} must be an array,
+vector, or string. The implementation-dependent type of the returned
+array will be the same as the type of @var{prototype}; except if that would be a
+vector or string with non-zero origin, in which case some variety of
+array will be returned.
+
+If the @var{prototype} has no elements, then the initial contents of the returned
+array are unspecified. Otherwise, the returned array will be filled
+with the element at the origin of @var{prototype}.
+@end defun
+@noindent
+These functions return a prototypical uniform-array enclosing the
+optional argument (which must be of the correct type). If the
+uniform-array type is supported by the implementation, then it is
+returned; defaulting to the next larger precision type; resorting
+finally to vector.
+
+
+@defun ac64 z
+
+
+@defunx ac64
+Returns a high-precision complex uniform-array prototype.
+@end defun
+
+@defun ac32 z
+
+
+@defunx ac32
+Returns a complex uniform-array prototype.
+@end defun
+
+@defun ar64 x
+
+
+@defunx ar64
+Returns a high-precision real uniform-array prototype.
+@end defun
+
+@defun ar32 x
+
+
+@defunx ar32
+Returns a real uniform-array prototype.
+@end defun
+
+@defun as64 n
+
+
+@defunx as64
+Returns an exact signed integer uniform-array prototype with at least
+64 bits of precision.
+@end defun
+
+@defun as32 n
+
+
+@defunx as32
+Returns an exact signed integer uniform-array prototype with at least
+32 bits of precision.
+@end defun
+
+@defun as16 n
+
+
+@defunx as16
+Returns an exact signed integer uniform-array prototype with at least
+16 bits of precision.
+@end defun
+
+@defun as8 n
+
+
+@defunx as8
+Returns an exact signed integer uniform-array prototype with at least
+8 bits of precision.
+@end defun
+
+@defun au64 k
+
+
+@defunx au64
+Returns an exact non-negative integer uniform-array prototype with at
+least 64 bits of precision.
+@end defun
+
+@defun au32 k
+
+
+@defunx au32
+Returns an exact non-negative integer uniform-array prototype with at
+least 32 bits of precision.
+@end defun
+
+@defun au16 k
+
+
+@defunx au16
+Returns an exact non-negative integer uniform-array prototype with at
+least 16 bits of precision.
+@end defun
+
+@defun au8 k
+
+
+@defunx au8
+Returns an exact non-negative integer uniform-array prototype with at
+least 8 bits of precision.
+@end defun
+
+@defun at1 bool
+
+
+@defunx at1
+Returns a boolean uniform-array prototype.
@end defun
@noindent
When constructing an array, @var{bound} is either an inclusive range of
@@ -39,7 +155,7 @@ indices expressed as a two element list, or an upper bound expressed as
a single integer. So
@example
-(make-array 'foo 3 3) @equiv{} (make-array 'foo '(0 2) '(0 2))
+(create-array '#(foo) 3 3) @equiv{} (create-array '#(foo) '(0 2) '(0 2))
@end example
@@ -52,7 +168,7 @@ linear, and its range must stay within the bounds of the old array, but
it can be otherwise arbitrary. A simple example:
@example
-(define fred (make-array #f 8 8))
+(define fred (create-array '#(#f) 8 8))
(define freds-diagonal
(make-shared-array fred (lambda (i) (list i i)) 8))
(array-set! freds-diagonal 'foo 3)
@@ -77,7 +193,7 @@ returned.
Returns a list of inclusive bounds.
@example
-(array-shape (make-array 'foo 3 5))
+(array-shape (create-array '#() 3 5))
@result{} ((0 2) (0 4))
@end example
@end defun
@@ -88,7 +204,7 @@ Returns a list of inclusive bounds.
elements with a 0 minimum with one greater than the maximum.
@example
-(array-dimensions (make-array 'foo 3 5))
+(array-dimensions (create-array '#() 3 5))
@result{} (3 5)
@end example
@end defun
@@ -104,8 +220,8 @@ Returns @code{#t} if its arguments would be acceptable to
Returns the (@var{index1}, @var{index2}, @dots{}) element of @var{array}.
@end defun
-@defun array-set! array obj index1 index2 @dots{}
+@deffn {Procedure} array-set! array obj index1 index2 @dots{}
Stores @var{obj} in the (@var{index1}, @var{index2}, @dots{}) element of @var{array}. The value returned
by @code{array-set!} is unspecified.
-@end defun
+@end deffn