pub struct Powers<F: TowerField> { /* private fields */ }
Expand description
A transparent multilinear polynomial whose evaluation at index $i$ is $g^i$ for some field element $g$.
Implementations§
Source§impl<F: TowerField> Powers<F>
impl<F: TowerField> Powers<F>
pub const fn new(n_vars: usize, base: F) -> Self
pub fn multilinear_extension<P: PackedField<Scalar = F>>( &self, ) -> Result<MultilinearExtension<P>, Error>
Trait Implementations§
Source§impl<F: TowerField + DeserializeBytes> DeserializeBytes for Powers<F>
impl<F: TowerField + DeserializeBytes> DeserializeBytes for Powers<F>
fn deserialize(
read_buf: impl Buf,
mode: SerializationMode,
) -> Result<Self, SerializationError>where
Self: Sized,
Source§impl<F: TowerField, P: PackedField<Scalar = F>> MultivariatePoly<P> for Powers<F>
impl<F: TowerField, P: PackedField<Scalar = F>> MultivariatePoly<P> for Powers<F>
Source§fn evaluate(&self, query: &[P]) -> Result<P, Error>
fn evaluate(&self, query: &[P]) -> Result<P, Error>
Evaluate the polynomial at a point in the extension field.
Source§fn binary_tower_level(&self) -> usize
fn binary_tower_level(&self) -> usize
Returns the maximum binary tower level of all constants in the arithmetic expression.
Source§fn erased_serialize(
&self,
write_buf: &mut dyn BufMut,
mode: SerializationMode,
) -> Result<(), SerializationError>
fn erased_serialize( &self, write_buf: &mut dyn BufMut, mode: SerializationMode, ) -> Result<(), SerializationError>
Serialize a type erased MultivariatePoly.
Since not every MultivariatePoly implements serialization, this defaults to returning an error.
Source§impl<F: TowerField + SerializeBytes> SerializeBytes for Powers<F>
impl<F: TowerField + SerializeBytes> SerializeBytes for Powers<F>
fn serialize( &self, write_buf: impl BufMut, mode: SerializationMode, ) -> Result<(), SerializationError>
Auto Trait Implementations§
impl<F> Freeze for Powers<F>
impl<F> RefUnwindSafe for Powers<F>
impl<F> Send for Powers<F>
impl<F> Sync for Powers<F>
impl<F> Unpin for Powers<F>
impl<F> UnwindSafe for Powers<F>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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