Converts a sparse array into full dense array format.
Synopsis
g2-sparse-scatter
(value-array: class quantity-array, index-array: class integer-array,
full-array: class quantity-array, begin-index: integer, end-index: integer)
Description
g2-sparse-scatter converts a sparse array represented by value-array and index-array into a dense array. It returns the dense array to the full-array argument.full-array must have all elements equal to zero when it is passed to this procedure. begin-index is the index of the first element in value-array to convert. end-index is the index of the last element in value-array that is converted. In the dense array, elements have the index values listed in index-array.
array-length of value-array - 1).
g2-sparse-scatter returns the dense array represented by varray and iarray:
call g2-sparse-scatter(varray, iarray, farray, 0, 4);
g2-sparse-array uses the values in varray and iarray to produce the following dense array:
(2, 0, 4, 6, 0, 3, 0, 0,1)
g2-sparse-array uses only the first two elements of varray to produce the dense array. In this case, g2-sparse-array returns:
(2, 0, 4, 0, 0, 0, 0, 0, 0)