Skip to content

Commit

Permalink
Use per node cost in serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
saulshanabrook committed Oct 14, 2024
1 parent 61766b9 commit 361e9a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ impl EGraph {
egraph_serialize::Node {
op: decl.name.to_string(),
eclass: class_id.clone(),
cost: NotNan::new(decl.cost.unwrap_or(1) as f64).unwrap(),
cost: NotNan::new(output.cost.unwrap_or(decl.cost.unwrap_or(1)) as f64)
.unwrap(),
children,
subsumed: output.subsumed,
},
Expand Down

0 comments on commit 361e9a3

Please sign in to comment.