function ijk_neighbors_test ( )

%*****************************************************************************80
%
%% ijk_neighbors_test tests ijk_neighbors().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    03 November 2002
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'ijk_neighbors_test\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  ijk_neighbors() returns the neighbors of a triangle.\n' );

  for k = 1 : 1
    t = triangle_hexiamond ( k );
    m = size ( t, 1 );
    name = name_hexiamond ( k );
    fprintf ( 1, '\n' );
    fprintf ( 1, '  %s\n', name );
    for i = 1 : m
      fprintf ( 1, '\n' );
      neighbors = ijk_neighbors ( t(i,1:3) );
      fprintf ( 1, '  triangle %2d  (%2d,%2d,%2d)\n', i, t(i,1:3) );
      for j = 1 : 3
        fprintf ( 1, '  neighbor %2d  (%2d,%2d,%2d)\n', j, neighbors(j,1:3) );
      end
    end
  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'ijk_neighbors_test\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

