Speed up evaluate() dramatically by eliminating unnecessary type cast and multiplication.  For large problems, this speeds up qbsolv considerably. Old way: cast solution[jj] to double, multiply it by coupler strength, and add product to row_sum or col_sum.  New way: test whether solution[jj] is non-zero; iff it is, add coupler strength to row_sum or col_sum.
Speed up evaluate() dramatically by eliminating unnecessary type cast and
multiplication.  For large problems, this speeds up qbsolv considerably.
Old way: cast solution[jj] to double, multiply it by coupler strength, and
add product to row_sum or col_sum.  New way: test whether solution[jj] is
non-zero; iff it is, add coupler strength to row_sum or col_sum.

old:
row_sum += qubo[ii][jj] * (double)solution[jj];
col_sum += qubo[jj][ii] * (double)solution[jj];

new:
if (solution[jj]) row_sum += qubo[ii][jj];
if (solution[jj]) col_sum += qubo[jj][ii];

Also calculate magnitude of variable's contribution in just one place and
set flip_cost to plus or minus that value.

Signed-off-by: S Davis <7a8a19649875a38a67681f12f34b91225412cf78@sddw.net>

myriagon/qbsolv,myriagon/qbsolv,myriagon/qbsolv,myriagon/qbsolv,myriagon/qbsolv