pub fn calculate_energy(matrix: &QuboMatrix, assignment: &[u8]) -> f64Expand description
Calculates the exact QUBO objective energy for a given binary assignment: E(x) = sum_i linear[i] * x[i] + sum_(i, j, J) J * x[i] * x[j]
pub fn calculate_energy(matrix: &QuboMatrix, assignment: &[u8]) -> f64Calculates the exact QUBO objective energy for a given binary assignment: E(x) = sum_i linear[i] * x[i] + sum_(i, j, J) J * x[i] * x[j]