Vocabularymath.
matricesInputsOutputsWord descriptionEvery element in the input matrix
m is multiplied by the scalar
n.
Notes• | The shape of the input matrix is preserved in the output. |
• | This word is the swapped variant of n*m. |
• | This word is intended for use with "flat" (2-dimensional) matrices. |
• | This word assumes that elements of the input matrix are compatible with the following words: * ( x y -- z ) |
ExamplesUSING: kernel math.matrices prettyprint ;
3 <identity-matrix> 3 m*n .
{ { 3 0 0 } { 0 3 0 } { 0 0 3 } }
Definition