<coordinate-matrix> ( dim -- coordinates )
Matrix operations

Prev:<eye> ( m n k z -- matrix )
Next:<square-rows> ( desc -- matrix )


Vocabulary
math.matrices

Inputs
dima pair


Outputs
coordinatesa matrix


Word description
Create a matrix in which each element is its own coordinate pair, also called a cartesian-product.

Notes
This word is the non-square variant of <cartesian-square-indices>.
Only the first two values in dim are used.


Examples
USING: math.matrices prettyprint ; { 2 4 } <coordinate-matrix> .
{ { { 0 0 } { 0 1 } { 0 2 } { 0 3 } } { { 1 0 } { 1 1 } { 1 2 } { 1 3 } } }


Definition