pub struct RationalFunctionField<R: Field> { /* private fields */ }Expand description
The rational function field R(t) over a coefficient field R.
The coefficient context and variable name are part of field identity. Elements are reduced fractions in the associated univariate polynomial ring, with a monic denominator.
Implementations§
Source§impl<R: Field> RationalFunctionField<R>
impl<R: Field> RationalFunctionField<R>
Sourcepub fn new(
coefficient_ring: R,
variable: impl Into<String>,
) -> Result<Self, RationalFunctionError>
pub fn new( coefficient_ring: R, variable: impl Into<String>, ) -> Result<Self, RationalFunctionError>
Construct coefficient_ring(variable).
Sourcepub fn coefficient_ring(&self) -> &R
pub fn coefficient_ring(&self) -> &R
Coefficient field.
Sourcepub fn polynomial_ring(&self) -> &PolynomialRing<R>
pub fn polynomial_ring(&self) -> &PolynomialRing<R>
Associated univariate polynomial ring.
Sourcepub fn to_json(&self) -> Result<String, NoetherError>where
R: Serialize,
pub fn to_json(&self) -> Result<String, NoetherError>where
R: Serialize,
Serialize the complete coefficient-field and variable context.
Sourcepub fn from_json(value: &str) -> Result<Self, NoetherError>where
R: for<'de> Deserialize<'de>,
pub fn from_json(value: &str) -> Result<Self, NoetherError>where
R: for<'de> Deserialize<'de>,
Deserialize and revalidate a rational-function field context.
Sourcepub fn generator(&self) -> RationalFunction<R>
pub fn generator(&self) -> RationalFunction<R>
Transcendental generator.
Sourcepub fn constant(
&self,
coefficient: R::Element,
) -> Result<RationalFunction<R>, RationalFunctionError>
pub fn constant( &self, coefficient: R::Element, ) -> Result<RationalFunction<R>, RationalFunctionError>
Embed one coefficient as a constant rational function.
Sourcepub fn from_polynomial(
&self,
polynomial: Polynomial<R>,
) -> Result<RationalFunction<R>, ContextMismatchError>
pub fn from_polynomial( &self, polynomial: Polynomial<R>, ) -> Result<RationalFunction<R>, ContextMismatchError>
Embed one polynomial from the associated univariate polynomial ring.
Sourcepub fn fraction(
&self,
numerator: Polynomial<R>,
denominator: Polynomial<R>,
) -> Result<RationalFunction<R>, RationalFunctionError>
pub fn fraction( &self, numerator: Polynomial<R>, denominator: Polynomial<R>, ) -> Result<RationalFunction<R>, RationalFunctionError>
Construct and canonically reduce numerator / denominator.
Trait Implementations§
Source§impl<R: Clone + Field> Clone for RationalFunctionField<R>
impl<R: Clone + Field> Clone for RationalFunctionField<R>
Source§fn clone(&self) -> RationalFunctionField<R>
fn clone(&self) -> RationalFunctionField<R>
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 moreSource§impl<R: Field> Debug for RationalFunctionField<R>
impl<R: Field> Debug for RationalFunctionField<R>
Source§impl<'de, R> Deserialize<'de> for RationalFunctionField<R>where
R: Field + Deserialize<'de>,
impl<'de, R> Deserialize<'de> for RationalFunctionField<R>where
R: Field + Deserialize<'de>,
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<R: Field> Display for RationalFunctionField<R>
impl<R: Field> Display for RationalFunctionField<R>
Source§impl<R: Field> Field for RationalFunctionField<R>
impl<R: Field> Field for RationalFunctionField<R>
Source§impl<R: Field> PartialEq for RationalFunctionField<R>
impl<R: Field> PartialEq for RationalFunctionField<R>
Source§impl<R: Field> Ring for RationalFunctionField<R>
impl<R: Field> Ring for RationalFunctionField<R>
Source§type Element = RationalFunction<R>
type Element = RationalFunction<R>
Elements manufactured and validated by this context.
Source§fn contains(&self, value: &Self::Element) -> bool
fn contains(&self, value: &Self::Element) -> bool
Test whether a value belongs to this exact context.
Source§fn add(
&self,
a: &Self::Element,
b: &Self::Element,
) -> Result<Self::Element, ContextMismatchError>
fn add( &self, a: &Self::Element, b: &Self::Element, ) -> Result<Self::Element, ContextMismatchError>
Add two elements after checking their context.
Source§fn sub(
&self,
a: &Self::Element,
b: &Self::Element,
) -> Result<Self::Element, ContextMismatchError>
fn sub( &self, a: &Self::Element, b: &Self::Element, ) -> Result<Self::Element, ContextMismatchError>
Subtract two elements after checking their context.
Source§fn mul(
&self,
a: &Self::Element,
b: &Self::Element,
) -> Result<Self::Element, ContextMismatchError>
fn mul( &self, a: &Self::Element, b: &Self::Element, ) -> Result<Self::Element, ContextMismatchError>
Multiply two elements after checking their context.
Source§fn neg(
&self,
value: &Self::Element,
) -> Result<Self::Element, ContextMismatchError>
fn neg( &self, value: &Self::Element, ) -> Result<Self::Element, ContextMismatchError>
Negate an element after checking its context.
Source§fn is_zero(&self, value: &Self::Element) -> bool
fn is_zero(&self, value: &Self::Element) -> bool
Test whether a value is the additive identity. Read more
Source§fn sum_products(
&self,
products: &[(&Self::Element, &Self::Element)],
) -> Result<Self::Element, ContextMismatchError>
fn sum_products( &self, products: &[(&Self::Element, &Self::Element)], ) -> Result<Self::Element, ContextMismatchError>
Compute a sum of pairwise products in this context. Read more
Source§impl<R: Field> SemanticType for RationalFunctionField<R>
impl<R: Field> SemanticType for RationalFunctionField<R>
Source§const TYPE_ID: &'static str = "noether/commalg/RationalFunctionField@1"
const TYPE_ID: &'static str = "noether/commalg/RationalFunctionField@1"
Versioned, language-neutral semantic identity.
Source§fn canonical_bytes(&self) -> Result<Vec<u8>, NoetherError>
fn canonical_bytes(&self) -> Result<Vec<u8>, NoetherError>
Serialize without backend- or language-specific identity.
Source§fn describe() -> &'static TypeDescription
fn describe() -> &'static TypeDescription
Return static discovery metadata for the type.
Source§impl<R> Serialize for RationalFunctionField<R>
impl<R> Serialize for RationalFunctionField<R>
Source§impl<R: Field> UnitInversion for RationalFunctionField<R>
impl<R: Field> UnitInversion for RationalFunctionField<R>
impl<R: Field> CommutativeRing for RationalFunctionField<R>
impl<R: Field> Eq for RationalFunctionField<R>
impl<R: Field> IntegralDomain for RationalFunctionField<R>
Auto Trait Implementations§
impl<R> Freeze for RationalFunctionField<R>where
R: Freeze,
impl<R> RefUnwindSafe for RationalFunctionField<R>
impl<R> Send for RationalFunctionField<R>
impl<R> Sync for RationalFunctionField<R>
impl<R> Unpin for RationalFunctionField<R>where
R: Unpin,
impl<R> UnwindSafe for RationalFunctionField<R>
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