Skip to content

Commit

Permalink
Add PartialEq, Eq, and Hash for Row and Col structs. (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
c123w authored Oct 7, 2024
1 parent 6f9e416 commit 492c9de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/matrix_col.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::os::raw::c_int;
use crate::Problem;

/// Represents a constraint
#[derive(Debug, Clone, Copy)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Row(pub(crate) c_int);

/// A constraint matrix to build column-by-column
Expand Down
2 changes: 1 addition & 1 deletion src/matrix_row.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::matrix_col::ColMatrix;
use crate::Problem;

/// Represents a variable
#[derive(Debug, Clone, Copy)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Col(pub(crate) usize);

/// A complete optimization problem stored by row
Expand Down

0 comments on commit 492c9de

Please sign in to comment.