Struct twenty_first::shared_math::x_field_element::XFieldElement
source · [−]pub struct XFieldElement {
pub coefficients: [BFieldElement; 3],
}
Fields
coefficients: [BFieldElement; 3]
Implementations
sourceimpl XFieldElement
impl XFieldElement
pub fn shah_polynomial() -> Polynomial<BFieldElement>
pub fn new(coefficients: [BFieldElement; 3]) -> Self
pub fn new_u64(coeffs: [u64; 3]) -> Self
pub fn new_const(element: BFieldElement) -> Self
pub fn unlift(&self) -> Option<BFieldElement>
pub fn xgcd(
x: Polynomial<BFieldElement>,
y: Polynomial<BFieldElement>
) -> (Polynomial<BFieldElement>, Polynomial<BFieldElement>, Polynomial<BFieldElement>)
pub fn increment(&mut self, index: usize)
pub fn decrement(&mut self, index: usize)
Trait Implementations
sourceimpl Add<XFieldElement> for XFieldElement
impl Add<XFieldElement> for XFieldElement
type Output = XFieldElement
type Output = XFieldElement
The resulting type after applying the +
operator.
sourceimpl AddAssign<XFieldElement> for XFieldElement
impl AddAssign<XFieldElement> for XFieldElement
sourcefn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the +=
operation. Read more
sourceimpl Clone for XFieldElement
impl Clone for XFieldElement
sourcefn clone(&self) -> XFieldElement
fn clone(&self) -> XFieldElement
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl CyclicGroupGenerator for XFieldElement
impl CyclicGroupGenerator for XFieldElement
fn get_cyclic_group_elements(&self, max: Option<usize>) -> Vec<Self>
sourceimpl Debug for XFieldElement
impl Debug for XFieldElement
sourceimpl Default for XFieldElement
impl Default for XFieldElement
sourceimpl<'de> Deserialize<'de> for XFieldElement
impl<'de> Deserialize<'de> for XFieldElement
sourcefn 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
sourceimpl Display for XFieldElement
impl Display for XFieldElement
sourceimpl Div<XFieldElement> for XFieldElement
impl Div<XFieldElement> for XFieldElement
type Output = XFieldElement
type Output = XFieldElement
The resulting type after applying the /
operator.
sourceimpl FiniteField for XFieldElement
impl FiniteField for XFieldElement
sourceimpl From<Polynomial<BFieldElement>> for XFieldElement
impl From<Polynomial<BFieldElement>> for XFieldElement
sourcefn from(poly: Polynomial<BFieldElement>) -> Self
fn from(poly: Polynomial<BFieldElement>) -> Self
Converts to this type from the input type.
sourceimpl From<XFieldElement> for Polynomial<BFieldElement>
impl From<XFieldElement> for Polynomial<BFieldElement>
sourcefn from(item: XFieldElement) -> Self
fn from(item: XFieldElement) -> Self
Converts to this type from the input type.
sourceimpl From<u32> for XFieldElement
impl From<u32> for XFieldElement
sourceimpl FromVecu8 for XFieldElement
impl FromVecu8 for XFieldElement
fn from_vecu8(bytes: Vec<u8>) -> Self
sourceimpl GetRandomElements for XFieldElement
impl GetRandomElements for XFieldElement
sourceimpl Hash for XFieldElement
impl Hash for XFieldElement
sourceimpl Hashable<BFieldElement> for XFieldElement
impl Hashable<BFieldElement> for XFieldElement
fn to_sequence(&self) -> Vec<BFieldElement>
sourceimpl Hashable<u8> for XFieldElement
impl Hashable<u8> for XFieldElement
fn to_sequence(&self) -> Vec<u8>
sourceimpl Inverse for XFieldElement
impl Inverse for XFieldElement
sourceimpl ModPowU32 for XFieldElement
impl ModPowU32 for XFieldElement
fn mod_pow_u32(&self, exp: u32) -> Self
sourceimpl ModPowU64 for XFieldElement
impl ModPowU64 for XFieldElement
fn mod_pow_u64(&self, exponent: u64) -> Self
sourceimpl Mul<XFieldElement> for XFieldElement
impl Mul<XFieldElement> for XFieldElement
type Output = XFieldElement
type Output = XFieldElement
The resulting type after applying the *
operator.
sourceimpl MulAssign<XFieldElement> for XFieldElement
impl MulAssign<XFieldElement> for XFieldElement
sourcefn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the *=
operation. Read more
sourceimpl Neg for XFieldElement
impl Neg for XFieldElement
type Output = XFieldElement
type Output = XFieldElement
The resulting type after applying the -
operator.
sourceimpl New for XFieldElement
impl New for XFieldElement
fn new_from_usize(&self, value: usize) -> Self
sourceimpl One for XFieldElement
impl One for XFieldElement
sourceimpl PartialEq<XFieldElement> for XFieldElement
impl PartialEq<XFieldElement> for XFieldElement
sourcefn eq(&self, other: &XFieldElement) -> bool
fn eq(&self, other: &XFieldElement) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl PrimitiveRootOfUnity for XFieldElement
impl PrimitiveRootOfUnity for XFieldElement
fn primitive_root_of_unity(n: u64) -> Option<XFieldElement>
sourceimpl SamplableFrom<[BFieldElement; 5]> for XFieldElement
impl SamplableFrom<[BFieldElement; 5]> for XFieldElement
fn sample(digest: &[BFieldElement; 5]) -> Self
sourceimpl SamplableFrom<Vec<BFieldElement, Global>> for XFieldElement
impl SamplableFrom<Vec<BFieldElement, Global>> for XFieldElement
fn sample(digest: &Vec<BFieldElement>) -> Self
sourceimpl SamplableFrom<Vec<u8, Global>> for XFieldElement
impl SamplableFrom<Vec<u8, Global>> for XFieldElement
Sample pseudo-uniform XFieldElement from vector of uniform bytes. Statistical distance from uniform: ~2^{-192}.
sourceimpl Serialize for XFieldElement
impl Serialize for XFieldElement
sourceimpl Sub<XFieldElement> for XFieldElement
impl Sub<XFieldElement> for XFieldElement
type Output = XFieldElement
type Output = XFieldElement
The resulting type after applying the -
operator.
sourceimpl SubAssign<XFieldElement> for XFieldElement
impl SubAssign<XFieldElement> for XFieldElement
sourcefn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the -=
operation. Read more
sourceimpl Sum<XFieldElement> for XFieldElement
impl Sum<XFieldElement> for XFieldElement
sourceimpl Zero for XFieldElement
impl Zero for XFieldElement
impl Copy for XFieldElement
impl Eq for XFieldElement
impl StructuralEq for XFieldElement
impl StructuralPartialEq for XFieldElement
Auto Trait Implementations
impl RefUnwindSafe for XFieldElement
impl Send for XFieldElement
impl Sync for XFieldElement
impl Unpin for XFieldElement
impl UnwindSafe for XFieldElement
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more