function bnode = update_ess_logistic(bnode, m)
% UPDATE_ESS_LOGISTIC: Update the Expected Sufficient Statistics of a logistic node.
% bnode = update_ess_logistic(bnode, family_marginal)

% X = cts parent, Y = discrete self
y = m.T;
i = find(y==1);
if length(i)==1 % hence y was observed
  x = m.mu(:,i); % the cts value is placed in a posn compatible with the discrete
else
  x = m.mu(:,1); % the cts value is copied into all fields
end

bnode.num_samples = bnode.num_samples + 1;
bnode.parent_vals(bnode.num_samples,:) = x(:)';
bnode.self_vals(bnode.num_samples) = y(2); % prob. the target is on

