function bnode = mk_mux2_node(bnet, self, rgate, cgate, input)
% MK_MUX2_NODE Make a node whose conditional distrib. is a multiplexer with 2 selectors.
% bnode = mk_mux2_node(bnet, self, rgate, cgate, input)
%
% input is a 2D matrix of numbers, which identify the inputs to the mux.

bnode.type = 'mux2';
bnode.self = self;
bnode.parents = parents(bnet.adj_mat, self);
bnode.rgate = rgate;
bnode.cgate = cgate;
bnode.input = input;
bnode.self_size = bnet.node_sizes(self);
bnode.nparams = 0; % since deterministic
bnode.adjustable = 0;
[nrows ncols] = size(input);
