Vocabularymath.
matricesInputsOutputsGeneric word contractGenerate a
square-matrix from a descriptor.
Word descriptionIf the descriptor is an
integer, it is used to generate square rows within that range.
If it is a 1-dimensional sequence, it is
replicated to create each row.
If it is a
matrix, it is cropped into a
square-matrix.
If it is a
square-matrix, it is returned unchanged.
ExamplesUSING: math.matrices prettyprint ;
3 <square-rows> .
{ { 0 1 2 } { 0 1 2 } { 0 1 2 } }
USING: math.matrices prettyprint ;
{ 2 3 5 } <square-rows> .
{ { 2 3 5 } { 2 3 5 } { 2 3 5 } }
DefinitionMethods