MultiPolynomialStructure

Struct MultiPolynomialStructure 

Source
pub struct MultiPolynomialStructure<RS: RingEqSignature, RSB: BorrowedStructure<RS>> { /* private fields */ }

Implementations§

Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> MultiPolynomialStructure<RS, RSB>

Source

pub fn coeff_ring(&self) -> &RS

Source§

impl<RS: UniqueFactorizationMonoidSignature<FactoredExponent = NaturalCanonicalStructure> + GreatestCommonDivisorSignature + CharZeroRingSignature + FiniteUnitsSignature + 'static, RSB: BorrowedStructure<RS> + 'static> MultiPolynomialStructure<RS, RSB>

Source

pub fn factor_by_yuns_and_kroneckers_inductively( &self, factor_coeff: Rc<dyn Fn(&RS::Set) -> Factored<RS::Set, Natural>>, factor_poly: Rc<dyn Fn(&Polynomial<RS::Set>) -> Factored<Polynomial<RS::Set>, Natural>>, mpoly: &<Self as SetSignature>::Set, ) -> Factored<MultiPolynomial<RS::Set>, Natural>

Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> MultiPolynomialStructure<RS, RSB>

Source

pub fn reduce(&self, p: MultiPolynomial<RS::Set>) -> MultiPolynomial<RS::Set>

Source

pub fn var_pow(&self, v: Variable, k: usize) -> MultiPolynomial<RS::Set>

Source

pub fn var(&self, v: Variable) -> MultiPolynomial<RS::Set>

Source

pub fn as_constant(&self, p: &MultiPolynomial<RS::Set>) -> Option<RS::Set>

Source

pub fn degree(&self, p: &MultiPolynomial<RS::Set>) -> Option<usize>

Source

pub fn split_by_degree( &self, p: MultiPolynomial<RS::Set>, ) -> HashMap<usize, MultiPolynomial<RS::Set>>

Source

pub fn homogenize( &self, p: &MultiPolynomial<RS::Set>, v: &Variable, ) -> MultiPolynomial<RS::Set>

Source

pub fn expand( &self, p: &MultiPolynomial<RS::Set>, v: &Variable, ) -> Polynomial<MultiPolynomial<RS::Set>>

Source

pub fn partial_evaluate( &self, poly: &MultiPolynomial<RS::Set>, values: HashMap<Variable, impl Borrow<RS::Set>>, ) -> MultiPolynomial<RS::Set>

Source

pub fn evaluate( &self, poly: &MultiPolynomial<RS::Set>, values: HashMap<Variable, impl Borrow<RS::Set>>, ) -> RS::Set

Source§

impl<RS: IntegralDomainSignature, RSB: BorrowedStructure<RS>> MultiPolynomialStructure<RS, RSB>

Source

pub fn is_symmetric( &self, vars: Vec<impl Borrow<Variable>>, poly: &MultiPolynomial<RS::Set>, ) -> bool

Source

pub fn elementary_symmetric( &self, n: usize, vars: &[impl Borrow<Variable>], ) -> MultiPolynomial<RS::Set>

Source

pub fn as_elementary_symmetric_polynomials_unchecked( &self, vars: Vec<impl Borrow<Variable>>, poly: &MultiPolynomial<RS::Set>, ) -> (Vec<Variable>, MultiPolynomial<RS::Set>)

Source

pub fn as_elementary_symmetric_polynomials( &self, vars: Vec<impl Borrow<Variable>>, poly: &MultiPolynomial<RS::Set>, ) -> Option<(Vec<Variable>, MultiPolynomial<RS::Set>)>

Trait Implementations§

Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> AdditionSignature for MultiPolynomialStructure<RS, RSB>

Source§

fn add(&self, a: &Self::Set, b: &Self::Set) -> Self::Set

Source§

fn add_mut(&self, a: &mut Self::Set, b: &Self::Set)

Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> AdditiveGroupSignature for MultiPolynomialStructure<RS, RSB>

Source§

fn neg(&self, a: &Self::Set) -> Self::Set

Source§

fn sub(&self, a: &Self::Set, b: &Self::Set) -> Self::Set

Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> AdditiveMonoidSignature for MultiPolynomialStructure<RS, RSB>

Source§

fn sum(&self, vals: Vec<impl Borrow<Self::Set>>) -> Self::Set

Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> CancellativeAdditionSignature for MultiPolynomialStructure<RS, RSB>

Source§

fn try_sub(&self, a: &Self::Set, b: &Self::Set) -> Option<Self::Set>

Return the unique x such that a = b + x, or None if no such x exists.
Source§

impl<RS: IntegralDomainSignature, RSB: BorrowedStructure<RS>> CancellativeMultiplicationSignature for MultiPolynomialStructure<RS, RSB>

Source§

fn try_divide(&self, a: &Self::Set, b: &Self::Set) -> Option<Self::Set>

Source§

fn divisible(&self, a: &Self::Set, b: &Self::Set) -> bool

return true iff a is divisible by b
Source§

impl<RS: CharZeroRingSignature + EqSignature, RSB: BorrowedStructure<RS>> CharZeroRingSignature for MultiPolynomialStructure<RS, RSB>

Source§

fn try_to_int(&self, x: &Self::Set) -> Option<Integer>

Source§

impl<RS: CharacteristicSignature + RingEqSignature, RSB: BorrowedStructure<RS>> CharacteristicSignature for MultiPolynomialStructure<RS, RSB>

Source§

impl<RS: Clone + RingEqSignature, RSB: Clone + BorrowedStructure<RS>> Clone for MultiPolynomialStructure<RS, RSB>

Source§

fn clone(&self) -> MultiPolynomialStructure<RS, RSB>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<RS: Debug + RingEqSignature, RSB: Debug + BorrowedStructure<RS>> Debug for MultiPolynomialStructure<RS, RSB>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> EqSignature for MultiPolynomialStructure<RS, RSB>

Source§

fn equal(&self, a: &Self::Set, b: &Self::Set) -> bool

Source§

impl<B: BorrowedStructure<IntegerCanonicalStructure> + 'static> FactoringMonoidSignature for MultiPolynomialStructure<IntegerCanonicalStructure, B>

Source§

fn factor_unchecked(&self, p: &Self::Set) -> Factored<Self::Set, Natural>

Source§

fn is_irreducible(&self, a: &Self::Set) -> bool

Source§

fn factor( &self, a: &Self::Set, ) -> Factored<Self::Set, <Self::FactoredExponent as SetSignature>::Set>

Source§

impl<RS: FavoriteAssociateSignature + IntegralDomainSignature, RSB: BorrowedStructure<RS>> FavoriteAssociateSignature for MultiPolynomialStructure<RS, RSB>

Source§

fn factor_fav_assoc(&self, mpoly: &Self::Set) -> (Self::Set, Self::Set)

Source§

fn fav_assoc(&self, a: &Self::Set) -> Self::Set

Source§

fn is_fav_assoc(&self, a: &Self::Set) -> bool

Source§

impl<RS: GreatestCommonDivisorSignature, RSB: BorrowedStructure<RS>> GreatestCommonDivisorSignature for MultiPolynomialStructure<RS, RSB>

Source§

fn gcd(&self, x: &Self::Set, y: &Self::Set) -> Self::Set

Source§

fn gcd_list(&self, elems: Vec<impl Borrow<Self::Set>>) -> Self::Set

Source§

fn lcm(&self, x: &Self::Set, y: &Self::Set) -> Self::Set

Source§

fn lcm_list(&self, elems: Vec<impl Borrow<Self::Set>>) -> Self::Set

Source§

impl<RS: IntegralDomainSignature, RSB: BorrowedStructure<RS>> IntegralDomainSignature for MultiPolynomialStructure<RS, RSB>

Source§

fn try_from_rat(&self, x: &Rational) -> Option<Self::Set>

Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> MultiplicationSignature for MultiPolynomialStructure<RS, RSB>

Source§

fn mul(&self, a: &Self::Set, b: &Self::Set) -> Self::Set

Source§

fn mul_mut(&self, a: &mut Self::Set, b: &Self::Set)

Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> MultiplicativeMonoidSignature for MultiPolynomialStructure<RS, RSB>

Source§

fn product(&self, vals: Vec<impl Borrow<Self::Set>>) -> Self::Set

Source§

fn nat_pow(&self, a: &Self::Set, n: &Natural) -> Self::Set

Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> OneSignature for MultiPolynomialStructure<RS, RSB>

Source§

fn one(&self) -> Self::Set

Source§

impl<RS: PartialEq + RingEqSignature, RSB: PartialEq + BorrowedStructure<RS>> PartialEq for MultiPolynomialStructure<RS, RSB>

Source§

fn eq(&self, other: &MultiPolynomialStructure<RS, RSB>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> RingSignature for MultiPolynomialStructure<RS, RSB>

Source§

fn is_reduced(&self) -> Result<bool, String>

Determine whether the ring is reduced. Read more
Source§

fn bracket(&self, a: &Self::Set, b: &Self::Set) -> Self::Set

Source§

fn from_int(&self, x: impl Into<Integer>) -> Self::Set

Source§

fn inbound_principal_integer_map(&self) -> PrincipalIntegerMap<Self, &Self>

Source§

fn into_inbound_principal_integer_map(self) -> PrincipalIntegerMap<Self, Self>

Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> RinglikeSpecializationSignature for MultiPolynomialStructure<RS, RSB>

Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> SemiRingSignature for MultiPolynomialStructure<RS, RSB>

Source§

fn from_nat(&self, x: impl Into<Natural>) -> Self::Set

Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> SetSignature for MultiPolynomialStructure<RS, RSB>

Source§

type Set = MultiPolynomial<<RS as SetSignature>::Set>

Source§

fn is_element(&self, _x: &Self::Set) -> Result<(), String>

Some instances of Self::Set may not be valid to represent elements of this set. Return true if x is a valid element and false if not.
Source§

impl<RS: RingEqSignature + ToStringSignature, RSB: BorrowedStructure<RS>> ToStringSignature for MultiPolynomialStructure<RS, RSB>

Source§

fn to_string(&self, p: &Self::Set) -> String

Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> TryNegateSignature for MultiPolynomialStructure<RS, RSB>

Source§

fn try_neg(&self, a: &Self::Set) -> Option<Self::Set>

Source§

impl<RS: IntegralDomainSignature, RSB: BorrowedStructure<RS>> TryReciprocalSignature for MultiPolynomialStructure<RS, RSB>

Source§

fn try_reciprocal(&self, a: &Self::Set) -> Option<Self::Set>

b such that a*b=1 and b*a=1 or None if no such b exists.
Source§

fn is_unit(&self, a: &Self::Set) -> bool

Source§

fn units(&self) -> MultiplicativeMonoidUnitsStructure<Self, &Self>

Source§

fn into_units(self) -> MultiplicativeMonoidUnitsStructure<Self, Self>

Source§

impl<RS: UniqueFactorizationMonoidSignature + IntegralDomainSignature, RSB: BorrowedStructure<RS>> UniqueFactorizationMonoidSignature for MultiPolynomialStructure<RS, RSB>

Source§

type FactoredExponent = NaturalCanonicalStructure

Source§

fn factorization_exponents(&self) -> &Self::FactoredExponent

Source§

fn into_factorization_exponents(self) -> Self::FactoredExponent

Source§

fn try_is_irreducible(&self, _a: &Self::Set) -> Option<bool>

This should determine whether a is irreducible without factoring it. Factoring a is not allowed because this function is used by factorizations to validate their state.
Source§

fn factorization_pow(&self, a: &Self::Set, k: &Natural) -> Self::Set

Source§

fn factorizations( &self, ) -> FactoringStructure<Self, &Self, Self::FactoredExponent, &Self::FactoredExponent>

Source§

fn into_factorizations( self, ) -> FactoringStructure<Self, Self, Self::FactoredExponent, Self::FactoredExponent>

Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> ZeroSignature for MultiPolynomialStructure<RS, RSB>

Source§

fn zero(&self) -> Self::Set

Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> CommutativeMultiplicationSignature for MultiPolynomialStructure<RS, RSB>

Source§

impl<RS: Eq + RingEqSignature, RSB: Eq + BorrowedStructure<RS>> Eq for MultiPolynomialStructure<RS, RSB>

Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> LeftDistributiveMultiplicationOverAddition for MultiPolynomialStructure<RS, RSB>

Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> MultiplicativeAbsorptionMonoidSignature for MultiPolynomialStructure<RS, RSB>

Source§

impl<RS: IntegralDomainSignature, RSB: BorrowedStructure<RS>> MultiplicativeIntegralMonoidSignature for MultiPolynomialStructure<RS, RSB>

Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> RightDistributiveMultiplicationOverAddition for MultiPolynomialStructure<RS, RSB>

Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> Signature for MultiPolynomialStructure<RS, RSB>

Source§

impl<RS: RingEqSignature, RSB: BorrowedStructure<RS>> StructuralPartialEq for MultiPolynomialStructure<RS, RSB>

Auto Trait Implementations§

§

impl<RS, RSB> Freeze for MultiPolynomialStructure<RS, RSB>
where RSB: Freeze,

§

impl<RS, RSB> RefUnwindSafe for MultiPolynomialStructure<RS, RSB>
where RSB: RefUnwindSafe, RS: RefUnwindSafe,

§

impl<RS, RSB> Send for MultiPolynomialStructure<RS, RSB>

§

impl<RS, RSB> Sync for MultiPolynomialStructure<RS, RSB>

§

impl<RS, RSB> Unpin for MultiPolynomialStructure<RS, RSB>
where RSB: Unpin, RS: Unpin,

§

impl<RS, RSB> UnwindSafe for MultiPolynomialStructure<RS, RSB>
where RSB: UnwindSafe, RS: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<S> AreAssociateMultiplicationSignature for S

Source§

fn are_associate(&self, a: &Self::Set, b: &Self::Set) -> bool

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T, U> ExactFrom<T> for U
where U: TryFrom<T>,

Source§

fn exact_from(value: T) -> U

Source§

impl<T, U> ExactInto<U> for T
where U: ExactFrom<T>,

Source§

fn exact_into(self) -> U

Source§

impl<S> FactoringMonoidNaturalExponentSignature for S

Source§

fn gcd_by_factor(&self, a: &Self::Set, b: &Self::Set) -> Self::Set

Source§

fn lcm_by_factor(&self, a: &Self::Set, b: &Self::Set) -> Option<Self::Set>

Source§

fn is_squarefree(&self, a: &Self::Set) -> bool

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<RS> InfiniteSignature for RS
where RS: CharZeroRingSignature + 'static,

Source§

fn generate_distinct_elements( &self, ) -> Box<dyn Iterator<Item = <RS as SetSignature>::Set>>

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<S> IntoErgonomicSignature for S
where S: SetSignature,

Source§

fn into_ergonomic(&self, elem: Self::Set) -> StructuredElement<Self>

Source§

impl<S> LeftCancellativeMultiplicationSignature for S

Source§

fn try_left_divide( &self, a: &<S as SetSignature>::Set, b: &<S as SetSignature>::Set, ) -> Option<<S as SetSignature>::Set>

Try to find x such that a = b * x.
Source§

impl<S> MultiplicativeMonoidTryInverseSignature for S

Source§

fn try_int_pow(&self, a: &Self::Set, n: &Integer) -> Option<Self::Set>

Source§

impl<T, U> OverflowingInto<U> for T
where U: OverflowingFrom<T>,

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<S> RightCancellativeMultiplicationSignature for S

Source§

fn try_right_divide( &self, a: &<S as SetSignature>::Set, b: &<S as SetSignature>::Set, ) -> Option<<S as SetSignature>::Set>

Try to find x such that a = x * b.
Source§

impl<RS> RingMatricesSignature for RS
where RS: SetSignature,

Source§

fn matrices(&self) -> MatrixStructure<Self, &Self>

Source§

fn into_matrices(self) -> MatrixStructure<Self, Self>

Source§

impl<Ring> RingToFinitelyFreeModuleSignature for Ring
where Ring: RingSignature,

Source§

impl<RS> RingToMultiPolynomialRingSignature for RS
where RS: RingEqSignature,

Source§

impl<T, U> RoundingInto<U> for T
where U: RoundingFrom<T>,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> SaturatingInto<U> for T
where U: SaturatingFrom<T>,

Source§

impl<T> ToDebugString for T
where T: Debug,

Source§

fn to_debug_string(&self) -> String

Returns the String produced by Ts Debug implementation.

§Examples
use malachite_base::strings::ToDebugString;

assert_eq!([1, 2, 3].to_debug_string(), "[1, 2, 3]");
assert_eq!(
    [vec![2, 3], vec![], vec![4]].to_debug_string(),
    "[[2, 3], [], [4]]"
);
assert_eq!(Some(5).to_debug_string(), "Some(5)");
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<RS> ToPolynomialSignature for RS
where RS: Signature,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S> TryLeftReciprocalSignature for S

Source§

fn try_left_reciprocal( &self, a: &<S as SetSignature>::Set, ) -> Option<<S as SetSignature>::Set>

x such that x*a=1 or None if no such x exists.
Source§

impl<S> TryRightReciprocalSignature for S

Source§

fn try_right_reciprocal( &self, a: &<S as SetSignature>::Set, ) -> Option<<S as SetSignature>::Set>

x such that a*x=1 or None if no such x exists.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T, U> WrappingInto<U> for T
where U: WrappingFrom<T>,

Source§

fn wrapping_into(self) -> U

Source§

impl<R> ZeroEqSignature for R

Source§

fn is_zero(&self, a: &Self::Set) -> bool

Source§

impl<Domain, Range, M, BM> BorrowedMorphism<Domain, Range, M> for BM
where Domain: Signature, Range: Signature, M: Morphism<Domain, Range>, BM: Borrow<M> + Clone + Debug + Send + Sync,

Source§

impl<S, BS> BorrowedSet<S> for BS
where BS: Borrow<S> + Clone + Debug + Send + Sync,

Source§

impl<S, BS> BorrowedStructure<S> for BS
where S: Signature, BS: Borrow<S> + Clone + Debug + Eq + Send + Sync,

Source§

impl<R> RingEqSignature for R

Source§

impl<Ring> RingUnitsSignature for Ring

Source§

impl<R> SemiRingEqSignature for R