function dist = subset_distance_hamming ( t1, t2 )
%*****************************************************************************80
%
%% subset_distance_hamming() computes the Hamming distance between two sets.
%
% Discussion:
%
% The sets T1 and T2 are assumed to be subsets of a set of N elements.
%
% Licensing:
%
% This code is distributed under the MIT license.
%
% Modified:
%
% 03 January 2021
%
% Author:
%
% John Burkardt
%
% Reference:
%
% Donald Kreher, Douglas Simpson,
% Combinatorial Algorithms,
% CRC Press, 1998,
% ISBN: 0-8493-3988-X,
% LC: QA164.K73.
%
% Input:
%
% integer T1(M), T2(M), two subsets of the master set.
% T1(I) = 0 if the I-th element is in the subset T1, and is
% 1 otherwise; T2 is defined similarly.
%
% Output:
%
% integer DIST, the Hamming distance between T1 and T2,
% defined as the number of elements of the master set which are
% in either T1 or T2 but not both.
%
dist = sum ( t1 ~= t2 );
return
end