ijtok
is a helper function that converts two-dimensional indices
i
and j
to a one-dimensional index k
. This can be
useful if, for example, one-dimensional indexing is easier to implement
than two-dimensional indexing.
ijtok(x, i, j)
A matrix-like object.
The first component of a two-dimensional index.
The second component of a two-dimensional index.
A one-dimensional index.
It is assumed that all indices are one-based.