A MATLAB/C++ Toolbox for Forney-Style Factor Graphs