pub fn add_constraint_with_weights<I: Iterator<Item=(Col, f64)>>(
        &mut self,
        columns_and_weights: I,
    ) {
        let (len, _) = columns_and_weights.size_hint();
        self.col_indices.reserve(len);
        for (col, weight) in columns_and_weights {
            self.col_indices.push(col.0.try_into().unwrap());
            self.weights.push(weight);
        }
        self.row_starts.push(self.col_indices.len().try_into().unwrap());
    }
/// Add a constraint to the group of constraints
Add a constraint to the group of constraints
Add a constraint to the group of constraints
pub fn add_constraint_with_weights<I: Iterator<Item=(Col, f64)>>(
        &mut self,
        columns_and_weights: I,
    ) {
        let (len, _) = columns_and_weights.size_hint();
        self.col_indices.reserve(len);
        for (col, weight) in columns_and_weights {
            self.col_indices.push(col.0.try_into().unwrap());
            self.weights.push(weight);
        }
        self.row_starts.push(self.col_indices.len().try_into().unwrap());
    }
pub fn add_constraint_with_weights < I : Iterator < Item = ( Col , f64 ) > > ( & mut self , columns_and_weights : I , ) { let ( len , _ ) = columns_and_weights . size_hint ( ) ; self . col_indices . reserve ( len ) ; for ( col , weight ) in columns_and_weights { self . col_indices . push ( col . 0 . try_into ( ) . unwrap ( ) ) ; self . weights . push ( weight ) ; } self . row_starts . push ( self . col_indices . len ( ) . try_into ( ) . unwrap ( ) ) ; }
Add a constraint to the group of constraints
Add a constraint to the group of constraints
&mut self
columns_and_weights
I
&mut self
columns_and_weights
I