Next: , Previous: make-simple-grid, Up: Functions for creation of grids


4.2.4.3 make-grid
— Function: grid:make-grid specification &rest keys &key initial-contents initial-element &allow-other-keys

Make a grid object with no or literal values specified. The specification is of the form ((component-type dimensions...) ... element-type) If initial-contents are specified, the dimensions may be omitted, ((component-type) ... element-type).

This is used for making any kind of grid with the same value for each element, or with literally specified values. The first argument is a specification, which has the form ((grid-type dimensions) element-type). The keyword arguments are :initial-element or :initial-contents. For example,
     (make-foreign-array 'double-float :dimensions 3 :initial-element 77.0d0)
     #m(77.0d0 77.0d0 77.0d0)
     (make-grid '((foreign-array 3) double-float) :initial-element 77.0d0)
     #m(77.0d0 77.0d0 77.0d0)