Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/row.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ impl Row {
}

/// Sets the rank of the row.
pub fn set_rank(&self, rank: usize) {
pub fn set_rank(&mut self, rank: usize) {
unsafe { ffi::SCIProwChgRank(self.raw, rank as c_int) };
}

/// Sets the coefficient of a variable in the row.
pub fn set_coeff(&self, var: &Variable, coeff: f64) {
pub fn set_coeff(&mut self, var: &Variable, coeff: f64) {
unsafe { ffi::SCIPaddVarToRow(self.scip.raw, self.raw, var.raw, coeff) };
}
}
Expand Down Expand Up @@ -249,7 +249,7 @@ mod tests {
_event: Event,
) {
let first_cons = model.conss()[0].clone();
let row = first_cons.row().unwrap();
let mut row = first_cons.row().unwrap();
assert_eq!(row.n_non_zeroes(), 1);
assert_eq!(row.lhs(), 1.0);
assert_eq!(row.index(), 0);
Expand Down
2 changes: 1 addition & 1 deletion src/separator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ mod tests {
sepa: SCIPSeparator,
) -> SeparationResult {
// adds a row representing the sum of all variables == 5, causing infeasibility
let row = sepa
let mut row = sepa
.create_empty_row(&model, "test", 5.0, 5.0, true, false, false)
.unwrap();
for var in model.vars() {
Expand Down
Loading