Trait rustnomial::MutablePolynomial[][src]

pub trait MutablePolynomial<N> {
    fn try_add_term(
        &mut self,
        coeff: N,
        degree: usize
    ) -> Result<(), TryAddError>;
fn try_sub_term(
        &mut self,
        coeff: N,
        degree: usize
    ) -> Result<(), TryAddError>; }

Required methods

Tries to add the term with given coefficient and degree to self, returning an error if the particular term can not be added to self without violating constraints.

Errors

Fails if the term with coefficient coeff and degree degree can not be added to self without violating one or more of self’s invariants.

Tries to subtract the term with given coefficient and degree from self, returning an error if the particular term can not be subtracted from self without violating constraints.

Errors

Fails if the term with coefficient coeff and degree degree can not be subtracted from self without violating one or more of self’s invariants.

Implementors