function a = i4cvv_rset ( mn, a, m, roff, i, ai )

%*****************************************************************************80
%
%% i4cvv_rset() sets row I from an I4CVV.
%
%  Discussion:
%
%    An I4CVV is a "vector of vectors" of I4's.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 December 2012
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer MN, the size of the cell array.
%
%    integer A(MN), the cell array.
%
%    integer M, the number of rows in the array.
%
%    integer ROFF(M+1), the row offsets.
%
%    integer I, the row.
%    1 <= I <= M.
%
%    integer AI(NR(I)), the new value of A(I,*).
%
%  Output:
%
%    integer A(MN), the cell array.
%
  k1 = roff(i) + 1;
  k2 = roff(i+1);
  nv = k2 + 1 - k1;
  a(k1:k2) = ai(1:nv);

  return
end
