function display_families(interslice, names)
% DISPLAY_FAMILIES displays to the screen the families which make up the DBN
%
% display_families(interslice names)
%
% interslice(i,j) is an edge from node i in t-1 to node j in t
% names{i} is the name of node i

% APRENDIZAJE AUTOMÁTICO (G. Pajares y J. M. de la Cruz, Eds.)
% Editorial: RA-MA
% Capítulo 6: Redes Bayesianas
% Autores: Diane Oyen, Eva Besada-Portas

N = length(interslice);

for i=1:N
  parents = find(interslice(:,i));
  
  s1 = sprintf('\n%s has parents: \n', names{i});
  s2 = sprintf('\n\t%s', names{parents});
  s = strcat(s1, s2);
  disp(s);
end
