pub struct PolynomialArithmetic;Expand description
Polynomial arithmetic operations
Implementations§
Source§impl PolynomialArithmetic
impl PolynomialArithmetic
Sourcepub fn add_polynomials(poly1: &Expression, poly2: &Expression) -> Expression
pub fn add_polynomials(poly1: &Expression, poly2: &Expression) -> Expression
Polynomial addition
Sourcepub fn multiply_polynomials(
poly1: &Expression,
poly2: &Expression,
) -> Expression
pub fn multiply_polynomials( poly1: &Expression, poly2: &Expression, ) -> Expression
Polynomial multiplication using convolution
Sourcepub fn evaluate_polynomial(
poly: &Expression,
var: &Symbol,
value: &Expression,
) -> Expression
pub fn evaluate_polynomial( poly: &Expression, var: &Symbol, value: &Expression, ) -> Expression
Polynomial evaluation using Horner’s method
Sourcepub fn compose_polynomials(
f: &Expression,
g: &Expression,
var: &Symbol,
) -> Expression
pub fn compose_polynomials( f: &Expression, g: &Expression, var: &Symbol, ) -> Expression
Polynomial composition f(g(x))
Auto Trait Implementations§
impl Freeze for PolynomialArithmetic
impl RefUnwindSafe for PolynomialArithmetic
impl Send for PolynomialArithmetic
impl Sync for PolynomialArithmetic
impl Unpin for PolynomialArithmetic
impl UnwindSafe for PolynomialArithmetic
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