function [changed, new_ps] = change_parents_mux(bnode, bnet)
% CHANGE_PARENTS_MUX If the gate is observed, select the relevant parent
% [changed, new_parents] = change_parents_mux(bnode, bnet, n)

if bnet.obs_mask(bnode.gate)
  g = bnet.values(bnode.gate);
  %new_ps = sort([bnode.gate bnode.input(g)]);
  new_ps = bnode.input(g);
  changed = 1;
else
  changed = 0;
  new_ps = [];
end
