function m = addInputOne2Two(m, inFrom, to1, to2, fwd)
% ADDINPUTONE2TWO adds a reaction of the form u -> x(1) + x(2)
%
% m = addInputOne2One(m, inFrom, to, fwd) adds a reaction of the form:
%
%          p(fwd)
% u(inFrom) --------> x(to1) + x(to2)
%

% (c) 2010 David R Hagen & Bruce Tidor
% This work is released under the MIT license.

m = b1add(m, inFrom, to1, fwd, 1);
m = b1add(m, inFrom, to2, fwd, 1);

m.nR = m.nR + 1;

[m.spinds.i_S, m.spinds.j_S, m.spinds.x_S, m.spinds.n_S] = ...
    sparse_vec(m.spinds.i_S, m.spinds.j_S, m.spinds.x_S, m.spinds.n_S, to1, m.nR, 1);
[m.spinds.i_S, m.spinds.j_S, m.spinds.x_S, m.spinds.n_S] = ...
    sparse_vec(m.spinds.i_S, m.spinds.j_S, m.spinds.x_S, m.spinds.n_S, to2, m.nR, 1);
