function ival = r8mat_is_diagonally_dominant_column ( m, n, a )

%*****************************************************************************80
%
%% r8mat_is_diagonally_dominant_column(): is A column diagonally dominant.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    08 April 2017
%
%  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 IVAL:
%    -1, the matrix is not column diagonally dominant.
%    1, the matrix is column diagonally dominant.
%    2, the matrix is strictly column diagonally dominant.
%
  ival = 2;

  for j = 1 : min ( m, n )

    s = abs ( a(j,j) );

    sumi = 0.0;
    for i = 1 : m
      if ( j ~= i )
        sumi = sumi + abs ( a(i,j) );
      end
    end

    if ( s < sumi )
      ival = -1;
      return
    elseif ( s == sumi )
      ival = +1;
    end

  end

  return
end
