Struct feanor_math::rings::float_real::Real64Base
source · pub struct Real64Base;Implementations§
source§impl Real64Base
impl Real64Base
pub fn is_absolute_approx_eq( &self, lhs: <Self as RingBase>::Element, rhs: <Self as RingBase>::Element, absolute_threshold: f64, ) -> bool
pub fn is_relative_approx_eq( &self, lhs: <Self as RingBase>::Element, rhs: <Self as RingBase>::Element, relative_threshold: f64, ) -> bool
pub fn is_approx_eq( &self, lhs: <Self as RingBase>::Element, rhs: <Self as RingBase>::Element, precision: u64, ) -> bool
Trait Implementations§
source§impl<I> CanHomFrom<I> for Real64Basewhere
I: ?Sized + IntegerRing,
impl<I> CanHomFrom<I> for Real64Basewhere
I: ?Sized + IntegerRing,
type Homomorphism = ()
fn has_canonical_hom(&self, _from: &I) -> Option<Self::Homomorphism>
fn map_in( &self, from: &I, el: <I as RingBase>::Element, _hom: &Self::Homomorphism, ) -> Self::Element
fn map_in_ref( &self, from: &I, el: &<I as RingBase>::Element, _hom: &Self::Homomorphism, ) -> Self::Element
fn mul_assign_map_in( &self, from: &S, lhs: &mut Self::Element, rhs: S::Element, hom: &Self::Homomorphism, )
fn mul_assign_map_in_ref( &self, from: &S, lhs: &mut Self::Element, rhs: &S::Element, hom: &Self::Homomorphism, )
source§impl<I> CanHomFrom<RationalFieldBase<I>> for Real64Base
impl<I> CanHomFrom<RationalFieldBase<I>> for Real64Base
type Homomorphism = ()
fn has_canonical_hom( &self, _from: &RationalFieldBase<I>, ) -> Option<Self::Homomorphism>
fn map_in( &self, from: &RationalFieldBase<I>, el: El<RationalField<I>>, hom: &Self::Homomorphism, ) -> Self::Element
fn map_in_ref( &self, from: &RationalFieldBase<I>, el: &El<RationalField<I>>, _hom: &Self::Homomorphism, ) -> Self::Element
fn mul_assign_map_in( &self, from: &S, lhs: &mut Self::Element, rhs: S::Element, hom: &Self::Homomorphism, )
fn mul_assign_map_in_ref( &self, from: &S, lhs: &mut Self::Element, rhs: &S::Element, hom: &Self::Homomorphism, )
source§impl CanHomFrom<Real64Base> for Real64Base
impl CanHomFrom<Real64Base> for Real64Base
type Homomorphism = ()
fn has_canonical_hom(&self, from: &Self) -> Option<()>
fn map_in( &self, _from: &Self, el: <Self as RingBase>::Element, _: &Self::Homomorphism, ) -> <Self as RingBase>::Element
fn map_in_ref( &self, from: &S, el: &S::Element, hom: &Self::Homomorphism, ) -> Self::Element
fn mul_assign_map_in( &self, from: &S, lhs: &mut Self::Element, rhs: S::Element, hom: &Self::Homomorphism, )
fn mul_assign_map_in_ref( &self, from: &S, lhs: &mut Self::Element, rhs: &S::Element, hom: &Self::Homomorphism, )
source§impl CanIsoFromTo<Real64Base> for Real64Base
impl CanIsoFromTo<Real64Base> for Real64Base
source§impl Clone for Real64Base
impl Clone for Real64Base
source§fn clone(&self) -> Real64Base
fn clone(&self) -> Real64Base
Returns a copy 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 DivisibilityRing for Real64Base
impl DivisibilityRing for Real64Base
source§fn checked_left_div(
&self,
lhs: &Self::Element,
rhs: &Self::Element,
) -> Option<Self::Element>
fn checked_left_div( &self, lhs: &Self::Element, rhs: &Self::Element, ) -> Option<Self::Element>
Checks whether there is an element
x such that rhs * x = lhs, and
returns it if it exists. Note that this does not have to be unique, if
rhs is a left zero-divisor. In particular, this function will return any
element in the ring if lhs = rhs = 0.fn is_unit(&self, x: &Self::Element) -> bool
source§impl EuclideanRing for Real64Base
impl EuclideanRing for Real64Base
fn euclidean_div_rem( &self, _lhs: Self::Element, _rhs: &Self::Element, ) -> (Self::Element, Self::Element)
fn euclidean_deg(&self, _: &Self::Element) -> Option<usize>
fn euclidean_div( &self, lhs: Self::Element, rhs: &Self::Element, ) -> Self::Element
fn euclidean_rem( &self, lhs: Self::Element, rhs: &Self::Element, ) -> Self::Element
source§impl Field for Real64Base
impl Field for Real64Base
source§impl<J> LLLRealField<J> for Real64Basewhere
J: ?Sized + IntegerRing,
impl<J> LLLRealField<J> for Real64Basewhere
J: ?Sized + IntegerRing,
source§impl OrderedRing for Real64Base
impl OrderedRing for Real64Base
fn cmp(&self, lhs: &Self::Element, rhs: &Self::Element) -> Ordering
fn is_leq(&self, lhs: &Self::Element, rhs: &Self::Element) -> bool
fn is_geq(&self, lhs: &Self::Element, rhs: &Self::Element) -> bool
fn is_lt(&self, lhs: &Self::Element, rhs: &Self::Element) -> bool
fn is_gt(&self, lhs: &Self::Element, rhs: &Self::Element) -> bool
fn is_neg(&self, value: &Self::Element) -> bool
fn is_pos(&self, value: &Self::Element) -> bool
fn abs(&self, value: Self::Element) -> Self::Element
source§impl PartialEq for Real64Base
impl PartialEq for Real64Base
source§fn eq(&self, other: &Real64Base) -> bool
fn eq(&self, other: &Real64Base) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PrincipalIdealRing for Real64Base
impl PrincipalIdealRing for Real64Base
source§fn extended_ideal_gen(
&self,
_lhs: &Self::Element,
_rhs: &Self::Element,
) -> (Self::Element, Self::Element, Self::Element)
fn extended_ideal_gen( &self, _lhs: &Self::Element, _rhs: &Self::Element, ) -> (Self::Element, Self::Element, Self::Element)
Computes a Bezout identity for the generator
g of the ideal (lhs, rhs)
as g = s * lhs + t * rhs. Read moresource§impl RingBase for Real64Base
impl RingBase for Real64Base
type Element = f64
fn clone_el(&self, val: &Self::Element) -> Self::Element
fn add_assign(&self, lhs: &mut Self::Element, rhs: Self::Element)
fn negate_inplace(&self, x: &mut Self::Element)
fn mul_assign(&self, lhs: &mut Self::Element, rhs: Self::Element)
fn from_int(&self, value: i32) -> Self::Element
fn eq_el(&self, _: &Self::Element, _: &Self::Element) -> bool
source§fn pow_gen<R: IntegerRingStore>(
&self,
x: Self::Element,
power: &El<R>,
integers: R,
) -> Self::Elementwhere
R::Type: IntegerRing,
fn pow_gen<R: IntegerRingStore>(
&self,
x: Self::Element,
power: &El<R>,
integers: R,
) -> Self::Elementwhere
R::Type: IntegerRing,
Raises
x to the power of an arbitrary, nonnegative integer given by
a custom integer ring implementation. Read morefn is_commutative(&self) -> bool
fn is_noetherian(&self) -> bool
source§fn is_approximate(&self) -> bool
fn is_approximate(&self) -> bool
Returns whether this ring computes with approximations to elements.
This would usually be the case for rings that are based on
f32 or
f64, to represent real or complex numbers. Read morefn dbg<'a>(&self, x: &Self::Element, out: &mut Formatter<'a>) -> Result
source§fn characteristic<I: IntegerRingStore>(&self, ZZ: &I) -> Option<El<I>>where
I::Type: IntegerRing,
fn characteristic<I: IntegerRingStore>(&self, ZZ: &I) -> Option<El<I>>where
I::Type: IntegerRing,
Returns the characteristic of this ring as an element of the given
implementation of
ZZ. Read morefn add_assign_ref(&self, lhs: &mut Self::Element, rhs: &Self::Element)
fn sub_assign_ref(&self, lhs: &mut Self::Element, rhs: &Self::Element)
fn mul_assign_ref(&self, lhs: &mut Self::Element, rhs: &Self::Element)
fn zero(&self) -> Self::Element
fn one(&self) -> Self::Element
fn neg_one(&self) -> Self::Element
fn is_zero(&self, value: &Self::Element) -> bool
fn is_one(&self, value: &Self::Element) -> bool
fn is_neg_one(&self, value: &Self::Element) -> bool
fn square(&self, value: &mut Self::Element)
fn negate(&self, value: Self::Element) -> Self::Element
fn sub_assign(&self, lhs: &mut Self::Element, rhs: Self::Element)
fn mul_assign_int(&self, lhs: &mut Self::Element, rhs: i32)
fn mul_int(&self, lhs: Self::Element, rhs: i32) -> Self::Element
fn mul_int_ref(&self, lhs: &Self::Element, rhs: i32) -> Self::Element
source§fn sub_self_assign(&self, lhs: &mut Self::Element, rhs: Self::Element)
fn sub_self_assign(&self, lhs: &mut Self::Element, rhs: Self::Element)
Computes
lhs := rhs - lhs.source§fn sub_self_assign_ref(&self, lhs: &mut Self::Element, rhs: &Self::Element)
fn sub_self_assign_ref(&self, lhs: &mut Self::Element, rhs: &Self::Element)
Computes
lhs := rhs - lhs.fn add_ref(&self, lhs: &Self::Element, rhs: &Self::Element) -> Self::Element
fn add_ref_fst(&self, lhs: &Self::Element, rhs: Self::Element) -> Self::Element
fn add_ref_snd(&self, lhs: Self::Element, rhs: &Self::Element) -> Self::Element
fn add(&self, lhs: Self::Element, rhs: Self::Element) -> Self::Element
fn sub_ref(&self, lhs: &Self::Element, rhs: &Self::Element) -> Self::Element
fn sub_ref_fst(&self, lhs: &Self::Element, rhs: Self::Element) -> Self::Element
fn sub_ref_snd(&self, lhs: Self::Element, rhs: &Self::Element) -> Self::Element
fn sub(&self, lhs: Self::Element, rhs: Self::Element) -> Self::Element
fn mul_ref(&self, lhs: &Self::Element, rhs: &Self::Element) -> Self::Element
fn mul_ref_fst(&self, lhs: &Self::Element, rhs: Self::Element) -> Self::Element
fn mul_ref_snd(&self, lhs: Self::Element, rhs: &Self::Element) -> Self::Element
fn mul(&self, lhs: Self::Element, rhs: Self::Element) -> Self::Element
fn sum<I>(&self, els: I) -> Self::Element
fn prod<I>(&self, els: I) -> Self::Element
impl Copy for Real64Base
impl Domain for Real64Base
impl StructuralPartialEq for Real64Base
Auto Trait Implementations§
impl Freeze for Real64Base
impl RefUnwindSafe for Real64Base
impl Send for Real64Base
impl Sync for Real64Base
impl Unpin for Real64Base
impl UnwindSafe for Real64Base
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<R> ConvMulComputation for R
impl<R> ConvMulComputation for R
source§default fn karatsuba_threshold(&self) -> usize
default fn karatsuba_threshold(&self) -> usize
Define a threshold from which on the default implementation of
ConvMulComputation::add_assign_conv_mul()
will use the Karatsuba algorithm. Read moresource§impl<R, S> CooleyTuckeyButterfly<S> for R
impl<R, S> CooleyTuckeyButterfly<S> for R
source§default fn butterfly<V, H>(
&self,
hom: &H,
values: &mut V,
twiddle: &<S as RingBase>::Element,
i1: usize,
i2: usize,
)
default fn butterfly<V, H>( &self, hom: &H, values: &mut V, twiddle: &<S as RingBase>::Element, i1: usize, i2: usize, )
Should compute
(values[i1], values[i2]) := (values[i1] + twiddle * values[i2], values[i1] - twiddle * values[i2])source§impl<F> GBRingDescriptorRing for Fwhere
F: Field,
impl<F> GBRingDescriptorRing for Fwhere
F: Field,
fn create_ring_info(&self) -> RingInfo<F>
source§impl<R> InnerProductComputation for R
impl<R> InnerProductComputation for R
source§default fn inner_product_ref_fst<'a, I>(
&self,
els: I,
) -> <R as RingBase>::Element
default fn inner_product_ref_fst<'a, I>( &self, els: I, ) -> <R as RingBase>::Element
Computes the inner product
sum_i lhs[i] * rhs[i].source§default fn inner_product_ref<'a, I>(&self, els: I) -> <R as RingBase>::Element
default fn inner_product_ref<'a, I>(&self, els: I) -> <R as RingBase>::Element
Computes the inner product
sum_i lhs[i] * rhs[i].