Skip to content

Commit

Permalink
feat: also take into account term type Symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonfmir committed Apr 11, 2024
1 parent 6977fda commit 758e1ab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions egg-pre-dcp/src/optimization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub struct Meta {

#[derive(Debug, Clone, PartialEq, Eq)]
pub enum TermType {
Problem, ObjFun, Constr, Constrs, Set, Function,
Problem, Set, Function, ObjFun, Constrs, Constr, Symbol
}

#[cfg(not(stop_on_success))]
Expand Down Expand Up @@ -256,7 +256,9 @@ impl Analysis<Optimization> for Meta {
domain = Some(Domain::make_singleton(std::f64::consts::PI));
is_constant = true;
}
Optimization::Symbol(_) => {}
Optimization::Symbol(_) => {
term_type = TermType::Symbol;
}
Optimization::Constant(f) => {
domain = Some(Domain::make_singleton((*f).into_inner()));
is_constant = true;
Expand Down

0 comments on commit 758e1ab

Please sign in to comment.