Skip to content

Commit

Permalink
experimental commit
Browse files Browse the repository at this point in the history
    dropping a field from `Var` to check the effect of a struct size

	modified:   src/var.rs
  • Loading branch information
shnarazk committed Mar 4, 2020
1 parent aa36c7b commit 8036598
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/var.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub struct Var {
/// the number of conflicts at which this var was assigned lastly.
timestamp: usize,
/// the number of conflicts at which this var was rewarded lastly.
last_used: usize,
// last_used: usize,
/// list of clauses which contain this variable positively.
pub pos_occurs: Vec<ClauseId>,
/// list of clauses which contain this variable negatively.
Expand All @@ -102,7 +102,7 @@ impl Default for Var {
level: 0,
reward: 0.0,
timestamp: 0,
last_used: 0,
// last_used: 0,
pos_occurs: Vec::new(),
neg_occurs: Vec::new(),
flags: Flag::empty(),
Expand Down Expand Up @@ -315,7 +315,7 @@ impl VarRewardIF for VarDB {
fn reward_at_unassign(&mut self, vi: VarId) {
let v = &mut self.var[vi];
let duration = self.ordinal + 1 - v.timestamp;
let _dormant = (self.ordinal + 1 - v.last_used) as f64;
// let _dormant = (self.ordinal + 1 - v.last_used) as f64;
let rate = v.participated as f64 / duration as f64;
v.reward *= self.activity_decay;
v.reward += (1.0 - self.activity_decay) * rate;
Expand Down

0 comments on commit 8036598

Please sign in to comment.