Wrap full evaluator pipeline into evaluator() function
This commit is contained in:
1 parent
c4eca9defe
commit
d7bcac7092
1 file changed
+13
+13
@@ -5,6 +5,8 @@ pub mod differentiate;
|
||||
pub mod simplify;
|
||||
pub mod canonicalise;
|
||||
|
||||
use crate::expression::Expression;
|
||||
|
||||
pub use normalise::*;
|
||||
pub use const_fold::*;
|
||||
pub use compose::*;
|
||||
@@ -31,3 +33,14 @@ impl std::fmt::Display for Error {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
pub fn evaluator(var: char)
|
||||
-> impl Evaluator<Expr = Expression, Error = Error> {
|
||||
crate::pipeline!(
|
||||
Normaliser::new(),
|
||||
Differentiator::new(var),
|
||||
ConstFolder::new(),
|
||||
Simplifier::new(),
|
||||
ConstFolder::new(),
|
||||
Canonicaliser::new())
|
||||
}
|
||||
Reference in new issue
Block a user