Skip to content

Commit

Permalink
cargo clippy (1.84)
Browse files Browse the repository at this point in the history
  • Loading branch information
shnarazk committed Jan 10, 2025
1 parent 7f7f7b1 commit a057b58
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/assign/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// Module `assign` implements Boolean Constraint Propagation and decision var selection.
/// This version can handle Chronological and Non Chronological Backtrack.
// Module `assign` implements Boolean Constraint Propagation and decision var selection.
// This version can handle Chronological and Non Chronological Backtrack.

/// Ema
mod ema;
Expand Down
5 changes: 5 additions & 0 deletions src/cdb/clause.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,4 +333,9 @@ impl Clause {
}
self.rank
}
pub fn extended_lbd(&self) -> f64 {
let l: f64 = self.len() as f64;
let r: f64 = self.rank as f64;
r + (l - r) / (l - r + 1.0)
}
}
7 changes: 0 additions & 7 deletions src/cdb/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,13 +521,6 @@ impl ClauseDBIF for ClauseDB {
/// reduce the number of 'learnt' or *removable* clauses.
#[cfg(feature = "keep_just_used_clauses")]
fn reduce(&mut self, asg: &mut impl AssignIF, threshold: f64) {
impl Clause {
fn extended_lbd(&self) -> f64 {
let l: f64 = self.len() as f64;
let r: f64 = self.rank as f64;
r + (l - r) / (l - r + 1.0)
}
}
// let ClauseDB {
// ref mut clause,
// ref mut lbd_temp,
Expand Down
2 changes: 1 addition & 1 deletion src/processor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ use {
/// use crate::{splr::config::Config, splr::types::*};
/// use crate::splr::processor::{Eliminator, EliminateIF};
/// use crate::splr::solver::Solver;
///
/// let mut s = Solver::instantiate(&Config::default(), &CNFDescription::default());
/// let mut elim = Eliminator::instantiate(&s.state.config, &s.state.cnf);
/// assert_eq!(elim.is_running(), false);
Expand Down
12 changes: 6 additions & 6 deletions src/processor/simplify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,9 @@ impl Eliminator {
self.enqueue_var(asg, l.vi(), true);
}

///
/// clause queue operations
///
//
// clause queue operations
//

/// enqueue a clause into eliminator's clause queue.
pub fn enqueue_clause(&mut self, ci: ClauseIndex, c: &mut Clause) {
Expand All @@ -537,9 +537,9 @@ impl Eliminator {
self.clause_queue.len()
}

///
/// var queue operations
///
//
// var queue operations
//

/// clear eliminator's var queue
fn clear_var_queue(&mut self, asg: &mut impl AssignIF) {
Expand Down

0 comments on commit a057b58

Please sign in to comment.