pub struct AntiderivativeRule {
pub rule_type: AntiderivativeRuleType,
pub result_template: String,
pub constant_handling: ConstantOfIntegration,
}Expand description
Antiderivative rule for automatic integration
Stores the antiderivative formula for a function, analogous to DerivativeRule. Supports simple antiderivatives, substitution patterns, and special techniques.
§Examples
use mathhook_core::functions::properties::{AntiderivativeRule, AntiderivativeRuleType, ConstantOfIntegration};
use mathhook_core::expr;
let sin_antiderivative = AntiderivativeRule {
rule_type: AntiderivativeRuleType::Simple {
antiderivative_fn: "cos".to_string(),
coefficient: expr!(-1),
},
result_template: "-cos(x) + C".to_string(),
constant_handling: ConstantOfIntegration::AddConstant,
};Fields§
§rule_type: AntiderivativeRuleTypeRule type for efficient computation
result_template: StringResult expression template (for documentation and validation) Example: “∫sin(x)dx = -cos(x) + C”
constant_handling: ConstantOfIntegrationConstant of integration behavior
Trait Implementations§
Source§impl Clone for AntiderivativeRule
impl Clone for AntiderivativeRule
Source§fn clone(&self) -> AntiderivativeRule
fn clone(&self) -> AntiderivativeRule
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AntiderivativeRule
impl !RefUnwindSafe for AntiderivativeRule
impl Send for AntiderivativeRule
impl Sync for AntiderivativeRule
impl Unpin for AntiderivativeRule
impl !UnwindSafe for AntiderivativeRule
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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