<cartesian-square-indices> ( n -- matrix )
Matrix operations

Prev:<lower-matrix> ( object m n -- matrix )
Next:matrix-normalize ( m -- m' )


Vocabulary
math.matrices

Inputs
nan integer


Outputs
matrixa square-matrix


Word description
Create a square-matrix full of cartesian-products. See cartesian product.

Notes
This word is the square variant of <cartesian-indices>.

Examples
USING: 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