17.05.2015 Views

zl:1 - FTP

zl:1 - FTP

zl:1 - FTP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

array-rank<br />

34<br />

I<br />

<strong>zl</strong>:array-push-portion-extend returns the to-array and the index of the<br />

next location to be filled.<br />

Example:<br />

(setq to-string<br />

(z1 : array-push-porti on-extend to-string<br />

from-string<br />

(or from 8)<br />

to»<br />

This is similar to <strong>zl</strong>:array-push-extend except that it copies more than one<br />

element and has different return values. The arguments default in the<br />

usual way, so that the default is to copy all of from-array to the end of<br />

to-array.<br />

<strong>zl</strong>:array-push-portion-extend adjusts the array size using adjust-array. It<br />

picks the new array size in the same way that <strong>zl</strong>:array-push-extend does,<br />

making it bigger than needed for the information being added. In this<br />

way, successive additions do not each end up consing a new array.<br />

<strong>zl</strong>:array-push-portion-extend uses copy-array-portion internally.<br />

See the function vector-push-portion-extend, page 612.<br />

array-rank array Function<br />

Returns the number of dimensions of array. For example:<br />

(array-rank (make-array '(3 5») => 2<br />

array-rank-limit<br />

Constant<br />

Represents the exclusive upper bound on the rank of an array. The value<br />

of this is 8.<br />

array-row-major-index array &rest subscripts Function<br />

Takes an array and valid subscripts for the array and returns a single positive<br />

integer, less than the total size of the array, that identifies the accessed<br />

element in the row-major ordering of the elements. The number of<br />

subscripts supplied must equal the rank of the array. Each subscript must<br />

be a nonnegative integer less than the corresponding array dimension.<br />

Like aref, array-row-major-index returns the position whether or not that<br />

position is within the active part of the array.<br />

For example:<br />

wi ndow is a conformal array whose 0,0 coordinate is at 256,256 of bi g­<br />

array. The following code creates a 114 size portal into the center of bigarray.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!