function error_sum = r8mat_is_unit_row ( m, n, a )

%*****************************************************************************80
%
%% r8mat_is_unit_row() checks whether A has rows of unit Euclidean norm.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 November 2007
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, N, the row and column dimensions of 
%    the matrix.  M and N must be positive.
%
%    real A(M,N), the matrix.
%
%  Output:
%
%    integer ERROR_SUM, the sum of the errors.
%
  error_sum = 0.0;

  for i = 1 : m

    error_sum = error_sum + ( 1.0 - r8vec_norm_l2 ( n, a(i,1:n) ) )^2;

  end

  error_sum = sqrt ( error_sum );

  return
end
