pub struct DifferentiabilityChecker;Expand description
Differentiability checker
Implementations§
Source§impl DifferentiabilityChecker
impl DifferentiabilityChecker
Sourcepub fn check(expr: &Expression, variable: Symbol) -> bool
pub fn check(expr: &Expression, variable: Symbol) -> bool
Check if an expression is differentiable
§Examples
use mathhook_core::{Expression, symbol};
use mathhook_core::calculus::derivatives::DifferentiabilityChecker;
let x = symbol!(x);
let expr = Expression::function("sin", vec![Expression::symbol(x.clone())]);
let is_diff = DifferentiabilityChecker::check(&expr, x.clone());Sourcepub fn is_function_differentiable(name: &str) -> bool
pub fn is_function_differentiable(name: &str) -> bool
Check if a specific function is differentiable
§Examples
use mathhook_core::calculus::derivatives::DifferentiabilityChecker;
let is_sin_diff = DifferentiabilityChecker::is_function_differentiable("sin");
let is_abs_diff = DifferentiabilityChecker::is_function_differentiable("abs");Auto Trait Implementations§
impl Freeze for DifferentiabilityChecker
impl RefUnwindSafe for DifferentiabilityChecker
impl Send for DifferentiabilityChecker
impl Sync for DifferentiabilityChecker
impl Unpin for DifferentiabilityChecker
impl UnsafeUnpin for DifferentiabilityChecker
impl UnwindSafe for DifferentiabilityChecker
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