function x = latin_edge ( dim_num, point_num )

%*****************************************************************************80
%
%% latin_edge() returns edge points in a Latin square.
%
%  Discussion:
%
%    In each spatial dimension, there will be exactly one
%    point with the coordinate value
%
%      ( 0, 1, 2, ..., point_num-1 ) / ( point_num - 1 )
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    21 March 2003
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer dim_num, the spatial dimension.
%
%    integer point_num, the number of points, which should be
%    at least 2!
%
%  Output:
%
%    real x(dim_num,point_num), the points.
%
  base = 1;

  if ( point_num == 1 )

    x(1:dim_num,1) = 0.5;

  else

    for i = 1: dim_num

      perm = perm_uniform ( point_num, base );

      for j = 1: point_num
        x(i,j) = ( perm(j) - 1 ) / ( point_num - 1 );
      end 

    end

  end

  return
end
