function m = addZero2Two(m, to1, to2, fwd)
%ADDONE2ONE adds an 0 --> x(1) + x(2) reaction to the model
%
% m = addZero2Two(m, to1, to2, fwd) adds a reaction to the model m of the 
% form:
% 
%    p(fwd)
% 0 ------> x(to1) + x(to2)
% 

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

m = kadd(m, to1, fwd, 1);
m = kadd(m, 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);
