pub struct EducationalPDESolver { /* private fields */ }Expand description
Educational PDE solver that provides step-by-step explanations
§Examples
use mathhook_core::calculus::pde::educational::wrapper::EducationalPDESolver;
use mathhook_core::{symbol, expr};
let solver = EducationalPDESolver::new();
let u = symbol!(u);
let x = symbol!(x);
let t = symbol!(t);
let equation = expr!(u + x + t);
let (result, explanation) = solver.solve_pde(&equation, &u, &[x, t]);
assert!(!explanation.steps.is_empty());Implementations§
Source§impl EducationalPDESolver
impl EducationalPDESolver
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new educational PDE solver
§Examples
use mathhook_core::calculus::pde::educational::wrapper::EducationalPDESolver;
let solver = EducationalPDESolver::new();Sourcepub fn solve_pde(
&self,
equation: &Expression,
variable: &Symbol,
independent_vars: &[Symbol],
) -> (SolverResult, StepByStepExplanation)
pub fn solve_pde( &self, equation: &Expression, variable: &Symbol, independent_vars: &[Symbol], ) -> (SolverResult, StepByStepExplanation)
Solve PDE with detailed educational steps
§Examples
use mathhook_core::calculus::pde::educational::wrapper::EducationalPDESolver;
use mathhook_core::{symbol, expr};
let solver = EducationalPDESolver::new();
let u = symbol!(u);
let x = symbol!(x);
let t = symbol!(t);
let equation = expr!(u + x);
let (result, explanation) = solver.solve_pde(&equation, &u, &[x, t]);
// Educational explanation is always provided
assert!(!explanation.steps.is_empty());Trait Implementations§
Source§impl Default for EducationalPDESolver
impl Default for EducationalPDESolver
Source§impl EquationSolver for EducationalPDESolver
Implement the EquationSolver trait for integration with SmartEquationSolver
impl EquationSolver for EducationalPDESolver
Implement the EquationSolver trait for integration with SmartEquationSolver
Source§fn solve(&self, equation: &Expression, variable: &Symbol) -> SolverResult
fn solve(&self, equation: &Expression, variable: &Symbol) -> SolverResult
Solve equation for given variable
Source§fn solve_with_explanation(
&self,
equation: &Expression,
variable: &Symbol,
) -> (SolverResult, StepByStepExplanation)
fn solve_with_explanation( &self, equation: &Expression, variable: &Symbol, ) -> (SolverResult, StepByStepExplanation)
Solve with step-by-step explanation
Source§fn can_solve(&self, equation: &Expression) -> bool
fn can_solve(&self, equation: &Expression) -> bool
Check if solver can handle this equation type
Auto Trait Implementations§
impl Freeze for EducationalPDESolver
impl !RefUnwindSafe for EducationalPDESolver
impl Send for EducationalPDESolver
impl Sync for EducationalPDESolver
impl Unpin for EducationalPDESolver
impl !UnwindSafe for EducationalPDESolver
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§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