pub struct CachedEvaluator { /* private fields */ }Expand description
An expression evaluator with integrated caching.
This provides a convenient interface for evaluating expressions with automatic caching of results.
Implementations§
Source§impl CachedEvaluator
impl CachedEvaluator
Sourcepub fn with_capacity(
eval_size: usize,
complex_size: usize,
simplify_size: usize,
) -> Self
pub fn with_capacity( eval_size: usize, complex_size: usize, simplify_size: usize, ) -> Self
Create a new cached evaluator with specified cache sizes
Sourcepub fn eval(
&self,
expr: &Expression,
values: &HashMap<String, f64>,
) -> SymEngineResult<f64>
pub fn eval( &self, expr: &Expression, values: &HashMap<String, f64>, ) -> SymEngineResult<f64>
Evaluate an expression with caching
Sourcepub fn eval_complex(
&self,
expr: &Expression,
values: &HashMap<String, f64>,
) -> SymEngineResult<Complex64>
pub fn eval_complex( &self, expr: &Expression, values: &HashMap<String, f64>, ) -> SymEngineResult<Complex64>
Evaluate an expression as complex with caching
Sourcepub fn simplify(&self, expr: &Expression) -> Expression
pub fn simplify(&self, expr: &Expression) -> Expression
Simplify an expression with caching
Sourcepub fn stats(&self) -> CombinedCacheStats
pub fn stats(&self) -> CombinedCacheStats
Get combined cache statistics
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for CachedEvaluator
impl !RefUnwindSafe for CachedEvaluator
impl Send for CachedEvaluator
impl Sync for CachedEvaluator
impl Unpin for CachedEvaluator
impl UnwindSafe for CachedEvaluator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more