
{{alias}}( shape, order, idx, dim )
    Returns the next Cartesian index (i.e., set of subscripts/dimension
    indices).

    The function does not check whether the current index is the "last" index.
    Instead, if the function is provided dimension indices corresponding to the
    last element, the function will cycle back to the "first" index.

    If provided an empty shape (i.e., a shape corresponding to a zero-
    dimensional ndarray) or a dimension index which is out-of-bounds, the
    function returns `null`.

    Parameters
    ----------
    shape: ArrayLike<integer>
        Array shape.

    order: string
        Index iteration order. Must be either row-major (C-style) or column-
        major (Fortran-style).

    idx: ArrayLike<integer>
        Current dimension indices.

    dim: integer
        Index of the dimension from which to start incrementing (inclusive).

    Returns
    -------
    out: Array<integer>|null
        Updated dimension indices (or null).

    Examples
    --------
    > var sh = [ 2, 2, 2 ];
    > var ord = 'row-major';
    > var idx = {{alias}}( sh, ord, [ 0, 0, 1 ], -1 )
    [ 0, 1, 0 ]
    > idx = {{alias}}( sh, ord, idx, -1 )
    [ 0, 1, 1 ]


{{alias}}.assign( shape, order, idx, dim, out )
    Returns the next Cartesian index (i.e., set of subscripts/dimension
    indices) and assigns results to a provided output array.

    The function does not check whether the current index is the "last" index.
    Instead, if the function is provided dimension indices corresponding to the
    last element, the function will cycle back to the "first" index.

    If provided an empty shape (i.e., a shape corresponding to a zero-
    dimensional ndarray) or a dimension index which is out-of-bounds, the
    function returns `null`.

    Parameters
    ----------
    shape: ArrayLike<integer>
        Array shape.

    order: string
        Index iteration order. Must be either row-major (C-style) or column-
        major (Fortran-style).

    idx: ArrayLike<integer>
        Current dimension indices.

    dim: integer
        Index of the dimension from which to start incrementing (inclusive).

    out: Array|TypedArray|Object
        Output array.

    Returns
    -------
    out: Array|TypedArray|Object
        Output array.

    Examples
    --------
    > var sh = [ 2, 2, 2 ];
    > var ord = 'row-major';
    > var out = [ 0, 0, 0 ];
    > var idx = {{alias}}.assign( sh, ord, [ 0, 0, 1 ], -1, out )
    [ 0, 1, 0 ]
    > var bool = ( out === idx )
    true

    See Also
    --------

