chickadee » matrix-utils » make-matrix-ones

make-matrix-ones:procedure

Given procedures MAKE-VECTOR and FILL-MATRIX!, returns a procedure ONES of the form ONES:: M * N [* ORDER] -> A

Where procedure ONES returns a matrix A of size M x N, in which all elements are 1. Optional argument ORDER specifies the matrix layout: ColMajor or RowMajor, default is RowMajor.

MAKE-VECTOR is one of the homogeneous vector creation procedures from SRFI-4, and FILL-MATRIX! is a procedure created by MAKE-FILL-MATRIX, above. FILL-MATRIX! must operate on the same type of vector as MAKE-VECTOR.