Function hercules::local_search_utils::one_flip_objective

source ยท
pub fn one_flip_objective(
    qubo: &Qubo,
    x_0: &Array1<usize>
) -> (f64, Array1<f64>)
Expand description

Efficient calculation of the delta of the objective function for a single bit flip for each variable more or less this is a helper function that allows for selecting the best bit to flip option without having to calculate the objective function for each bit flip, independently.

Run time is O(|Q|) + O(|x|)