fn make_b_non_negative(&mut self) {
        let rows_to_negate = self.b.iter_values().enumerate()
            .filter(|&(_, v)| v < &OF::zero())
            .map(|(i, _)| i)
            .collect();

        self.constraints.change_row_signs(&rows_to_negate);
        for row in rows_to_negate {
            match self.constraint_types[row] {
                RangedConstraintRelation::Less => {
                    self.constraint_types[row] = RangedConstraintRelation::Greater;
                    self.b[row] *= -OF::one();
                },
                RangedConstraintRelation::Equal => {
                    self.b[row] *= -OF::one();
                },
                RangedConstraintRelation::Greater => {
                    self.constraint_types[row] = RangedConstraintRelation::Less;
                    self.b[row] *= -OF::one();
                },
                RangedConstraintRelation::Range(ref range) => {
                    let minus_old_lower_bound = range - &self.b[row];
                    self.b[row] = minus_old_lower_bound;
                },
            };
        }

        debug_assert!(is_consistent(&self));
    }
/// Multiply the constraints by a constant such that the constraint value is >= 0.
///
/// This is a step towards representing a `GeneralForm` problem in standard form.
Multiply the constraints by a constant such that the constraint value is >= 0.
This is a step towards representing a `GeneralForm` problem in standard form.
Multiply the constraints by a constant such that the constraint value is > = 0 . This is a step towards representing a ` GeneralForm ` problem in standard form .
fn make_b_non_negative(&mut self) {
        let rows_to_negate = self.b.iter_values().enumerate()
            .filter(|&(_, v)| v < &OF::zero())
            .map(|(i, _)| i)
            .collect();
        self.constraints.change_row_signs(&rows_to_negate);
        for row in rows_to_negate {
            match self.constraint_types[row] {
                RangedConstraintRelation::Less => {
                    self.constraint_types[row] = RangedConstraintRelation::Greater;
                    self.b[row] *= -OF::one();
                },
                RangedConstraintRelation::Equal => {
                    self.b[row] *= -OF::one();
                },
                RangedConstraintRelation::Greater => {
                    self.constraint_types[row] = RangedConstraintRelation::Less;
                    self.b[row] *= -OF::one();
                },
                RangedConstraintRelation::Range(ref range) => {
                    let minus_old_lower_bound = range - &self.b[row];
                    self.b[row] = minus_old_lower_bound;
                },
            };
        }
        debug_assert!(is_consistent(&self));
    }
fn make_b_non_negative ( & mut self ) { let rows_to_negate = self . b . iter_values ( ) . enumerate ( ) . filter ( | & ( _ , v ) | v < & OF :: zero ( ) ) . map ( | ( i , _ ) | i ) . collect ( ) ; self . constraints . change_row_signs ( & rows_to_negate ) ; for row in rows_to_negate { match self . constraint_types [ row ] { RangedConstraintRelation :: Less => { self . constraint_types [ row ] = RangedConstraintRelation :: Greater ; self . b [ row ] *= - OF :: one ( ) ; } , RangedConstraintRelation :: Equal => { self . b [ row ] *= - OF :: one ( ) ; } , RangedConstraintRelation :: Greater => { self . constraint_types [ row ] = RangedConstraintRelation :: Less ; self . b [ row ] *= - OF :: one ( ) ; } , RangedConstraintRelation :: Range ( ref range ) => { let minus_old_lower_bound = range - & self . b [ row ] ; self . b [ row ] = minus_old_lower_bound ; } , } ; } debug_assert ! ( is_consistent ( self ) ) ; }
Multiply the constraints by a constant such that the constraint value is >= 0.
Multiply the constraints by a constant such that the constraint value is > = 0 .
&mut self
&mut self