fn fill_in_default_lower_bounds<F: Zero>(
    variables: &mut Vec<ShiftedVariable<F>>,
    needs_lower_bound: Vec<bool>,
) {
    debug_assert_eq!(variables.len(), needs_lower_bound.len());
    // Lower bounds should not have been touched yet for those variables that this method will modify.
    debug_assert!(variables.iter().zip(needs_lower_bound.iter()).all(|(variable, needs_lower)| {
        !*needs_lower || variable.lower_bound.is_none()
    }));

    for (j, needs_lower_bound) in needs_lower_bound.into_iter().enumerate() {
        if needs_lower_bound {
            variables[j].lower_bound = Some(F::zero());
        }
    }
}
/// Fill in default lower bound for those variables that need it.
///
/// # Arguments
///
/// * `variables`: Variables with some bounds processed and default bounds not yet substituted.
/// * `needs_lower_bound`: Whether the variable at that index needs a lower bound.
Fill in default lower bound for those variables that need it.
Fill in default lower bound for those variables that need it .
fn fill_in_default_lower_bounds<F: Zero>(
    variables: &mut Vec<ShiftedVariable<F>>,
    needs_lower_bound: Vec<bool>,
) {
    debug_assert_eq!(variables.len(), needs_lower_bound.len());
    // Lower bounds should not have been touched yet for those variables that this method will modify.
    debug_assert!(variables.iter().zip(needs_lower_bound.iter()).all(|(variable, needs_lower)| {
        !*needs_lower || variable.lower_bound.is_none()
    }));
    for (j, needs_lower_bound) in needs_lower_bound.into_iter().enumerate() {
        if needs_lower_bound {
            variables[j].lower_bound = Some(F::zero());
        }
    }
}
fn fill_in_default_lower_bounds < F : Zero > ( variables : & mut Vec < ShiftedVariable < F > > , needs_lower_bound : Vec < bool > , ) { debug_assert_eq ! ( variables len ( ) needs_lower_bound len ( ) ) ; // Lower bounds should not have been touched yet for those variables that this method will modify. debug_assert ! ( variables iter ( ) zip ( needs_lower_bound iter ( ) ) all ( ( variable needs_lower ) { needs_lower variable lower_bound is_none ( ) } ) ) ; for ( j , needs_lower_bound ) in needs_lower_bound . into_iter ( ) . enumerate ( ) { if needs_lower_bound { variables [ j ] . lower_bound = Some ( F :: zero ( ) ) ; } } }
Fill in default lower bound for those variables that need it.
Fill in default lower bound for those variables that need it .
variables
&mut Vec<ShiftedVariable<F>>
needs_lower_bound
Vec<bool>
variables
&mut Vec<ShiftedVariable<F>>
needs_lower_bound
Vec<bool>