Vocabularymath.
matricesInputsOutputsWord descriptionCreate a
square-matrix full of
cartesian-products. See
cartesian product.
NotesThis word is the square variant of
<cartesian-indices>.
ExamplesUSING: math.matrices prettyprint ;
1 <cartesian-square-indices> .
{ { { 0 0 } } }
USING: math.matrices prettyprint ;
3 <cartesian-square-indices> .
{
{ { 0 0 } { 0 1 } { 0 2 } }
{ { 1 0 } { 1 1 } { 1 2 } }
{ { 2 0 } { 2 1 } { 2 2 } }
}
Definition