Struct kimchi::circuits::expr::Linearization
source · pub struct Linearization<E, Column> {
pub constant_term: E,
pub index_terms: Vec<(Column, E)>,
}
Expand description
A “linearization”, which is linear combination with E
coefficients of
columns.
Fields§
§constant_term: E
§index_terms: Vec<(Column, E)>
Implementations§
source§impl<A, Column: Copy> Linearization<A, Column>
impl<A, Column: Copy> Linearization<A, Column>
sourcepub fn map<B, F: Fn(&A) -> B>(&self, f: F) -> Linearization<B, Column>
pub fn map<B, F: Fn(&A) -> B>(&self, f: F) -> Linearization<B, Column>
Apply a function to all the coefficients in the linearization.
source§impl<F: FftField, Column: PartialEq + Copy, ChallengeTerm: Copy> Linearization<Expr<ConstantExpr<F, ChallengeTerm>, Column>, Column>
impl<F: FftField, Column: PartialEq + Copy, ChallengeTerm: Copy> Linearization<Expr<ConstantExpr<F, ChallengeTerm>, Column>, Column>
sourcepub fn evaluate_constants<'a, Challenge: Index<ChallengeTerm, Output = F>, Environment: ColumnEnvironment<'a, F, ChallengeTerm, Challenge, Column = Column>>(
&self,
env: &Environment
) -> Linearization<Expr<F, Column>, Column>
pub fn evaluate_constants<'a, Challenge: Index<ChallengeTerm, Output = F>, Environment: ColumnEnvironment<'a, F, ChallengeTerm, Challenge, Column = Column>>( &self, env: &Environment ) -> Linearization<Expr<F, Column>, Column>
Evaluate the constants in a linearization with ConstantExpr<F>
coefficients down
to literal field elements.
source§impl<F: FftField, Column: Copy + Debug, ChallengeTerm: Copy> Linearization<Vec<PolishToken<F, Column, ChallengeTerm>>, Column>
impl<F: FftField, Column: Copy + Debug, ChallengeTerm: Copy> Linearization<Vec<PolishToken<F, Column, ChallengeTerm>>, Column>
sourcepub fn to_polynomial<'a, Challenge: Index<ChallengeTerm, Output = F>, ColEvaluations: ColumnEvaluations<F, Column = Column>, Environment: ColumnEnvironment<'a, F, ChallengeTerm, Challenge, Column = Column>>(
&self,
env: &Environment,
pt: F,
evals: &ColEvaluations
) -> (F, Evaluations<F, D<F>>)
pub fn to_polynomial<'a, Challenge: Index<ChallengeTerm, Output = F>, ColEvaluations: ColumnEvaluations<F, Column = Column>, Environment: ColumnEnvironment<'a, F, ChallengeTerm, Challenge, Column = Column>>( &self, env: &Environment, pt: F, evals: &ColEvaluations ) -> (F, Evaluations<F, D<F>>)
Given a linearization and an environment, compute the polynomial corresponding to the linearization, in evaluation form.
source§impl<F: FftField, Column: Debug + PartialEq + Copy, ChallengeTerm: Copy> Linearization<Expr<ConstantExpr<F, ChallengeTerm>, Column>, Column>
impl<F: FftField, Column: Debug + PartialEq + Copy, ChallengeTerm: Copy> Linearization<Expr<ConstantExpr<F, ChallengeTerm>, Column>, Column>
sourcepub fn to_polynomial<'a, Challenge: Index<ChallengeTerm, Output = F>, ColEvaluations: ColumnEvaluations<F, Column = Column>, Environment: ColumnEnvironment<'a, F, ChallengeTerm, Challenge, Column = Column>>(
&self,
env: &Environment,
pt: F,
evals: &ColEvaluations
) -> (F, DensePolynomial<F>)
pub fn to_polynomial<'a, Challenge: Index<ChallengeTerm, Output = F>, ColEvaluations: ColumnEvaluations<F, Column = Column>, Environment: ColumnEnvironment<'a, F, ChallengeTerm, Challenge, Column = Column>>( &self, env: &Environment, pt: F, evals: &ColEvaluations ) -> (F, DensePolynomial<F>)
Given a linearization and an environment, compute the polynomial corresponding to the linearization, in evaluation form.
Trait Implementations§
source§impl<E: Clone, Column: Clone> Clone for Linearization<E, Column>
impl<E: Clone, Column: Clone> Clone for Linearization<E, Column>
source§fn clone(&self) -> Linearization<E, Column>
fn clone(&self) -> Linearization<E, Column>
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<E: Default, Column> Default for Linearization<E, Column>
impl<E: Default, Column> Default for Linearization<E, Column>
source§impl<'de, E, Column> Deserialize<'de> for Linearization<E, Column>where
E: Deserialize<'de>,
Column: Deserialize<'de>,
impl<'de, E, Column> Deserialize<'de> for Linearization<E, Column>where E: Deserialize<'de>, Column: 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
Auto Trait Implementations§
impl<E, Column> RefUnwindSafe for Linearization<E, Column>where Column: RefUnwindSafe, E: RefUnwindSafe,
impl<E, Column> Send for Linearization<E, Column>where Column: Send, E: Send,
impl<E, Column> Sync for Linearization<E, Column>where Column: Sync, E: Sync,
impl<E, Column> Unpin for Linearization<E, Column>where Column: Unpin, E: Unpin,
impl<E, Column> UnwindSafe for Linearization<E, Column>where Column: UnwindSafe, E: UnwindSafe,
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