Vocabularymath.
matricesInputsOutputsGeneric word contractGenerate a
square-matrix from a descriptor.
Word descriptionIf the descriptor is an
integer, it is used to generate square columns within that range.
If it is a 1-dimensional sequence, it is
replicated to create each column.
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-cols> .
{ { 0 0 0 } { 1 1 1 } { 2 2 2 } }
USING: math.matrices prettyprint ;
{ 2 3 5 } <square-cols> .
{ { 2 2 2 } { 3 3 3 } { 5 5 5 } }
DefinitionMethods