pub struct DecomposableFoldingScheme<'a, CF: FoldingConfig> { /* private fields */ }

Implementations§

source§

impl<'a, CF: FoldingConfig> DecomposableFoldingScheme<'a, CF>

source

pub fn new( constraints: BTreeMap<CF::Selector, Vec<FoldingCompatibleExpr<CF>>>, common_constraints: Vec<FoldingCompatibleExpr<CF>>, srs: &'a CF::Srs, domain: Radix2EvaluationDomain<<<CF as FoldingConfig>::Curve as AffineRepr>::ScalarField>, structure: &CF::Structure ) -> (Self, FoldingCompatibleExpr<CF>)

Creates a new folding scheme for decomposable circuits. It takes as input:

  • a set of constraints, each associated with a particular selector;
  • a list of common constraints, that are applied to every instance regardless of the selector (can be empty);
  • a structured reference string;
  • a domain;
  • a structure of the associated folding configuration. The function uses the normal FoldingScheme::new() function to create the decomposable scheme, using for that the concatenation of the constraints associated with each selector multiplied by the selector, and the common constraints. This product is performed with FoldingCompatibleExprInner::Extensions(ExpExtension::Selector(s)).
source

pub fn get_number_of_additional_columns(&self) -> usize

Return the number of additional columns added by quadraticization

source

pub fn fold_instance_witness_pair<A, B, Sponge>( &self, a: A, b: B, selector: Option<CF::Selector>, fq_sponge: &mut Sponge ) -> FoldingOutput<CF>where A: RelaxablePair<CF::Curve, CF::Instance, CF::Witness>, B: RelaxablePair<CF::Curve, CF::Instance, CF::Witness>, Sponge: FqSponge<<<CF as FoldingConfig>::Curve as AffineRepr>::BaseField, CF::Curve, <<CF as FoldingConfig>::Curve as AffineRepr>::ScalarField>,

folding with a selector will assume that only the selector in question is enabled (i.e. set to 1) in all rows, and any other selector is 0 over all rows. If that is not the case, providing None will fold without assumptions

source

pub fn fold_instance_pair<A, B, Sponge>( &self, a: A, b: B, error_commitments: [PolyComm<CF::Curve>; 2], fq_sponge: &mut Sponge ) -> RelaxedInstance<CF::Curve, CF::Instance>where A: RelaxableInstance<CF::Curve, CF::Instance>, B: RelaxableInstance<CF::Curve, CF::Instance>, Sponge: FqSponge<<<CF as FoldingConfig>::Curve as AffineRepr>::BaseField, CF::Curve, <<CF as FoldingConfig>::Curve as AffineRepr>::ScalarField>,

Fold two relaxable instances into a relaxed instance. It is parametrized by two different types A and B that represent “relaxable” instances to be able to fold a normal and “already relaxed” instance.

Auto Trait Implementations§

§

impl<'a, CF> RefUnwindSafe for DecomposableFoldingScheme<'a, CF>where <CF as FoldingConfig>::Challenge: RefUnwindSafe, <CF as FoldingConfig>::Column: RefUnwindSafe, <<CF as FoldingConfig>::Curve as AffineRepr>::ScalarField: RefUnwindSafe, <CF as FoldingConfig>::Selector: RefUnwindSafe, <CF as FoldingConfig>::Srs: RefUnwindSafe, <CF as FoldingConfig>::Structure: RefUnwindSafe,

§

impl<'a, CF> Send for DecomposableFoldingScheme<'a, CF>where <CF as FoldingConfig>::Challenge: Send, <CF as FoldingConfig>::Column: Send, <CF as FoldingConfig>::Selector: Send, <CF as FoldingConfig>::Srs: Sync, <CF as FoldingConfig>::Structure: Send,

§

impl<'a, CF> Sync for DecomposableFoldingScheme<'a, CF>where <CF as FoldingConfig>::Challenge: Sync, <CF as FoldingConfig>::Column: Sync, <CF as FoldingConfig>::Selector: Sync, <CF as FoldingConfig>::Srs: Sync, <CF as FoldingConfig>::Structure: Sync,

§

impl<'a, CF> Unpin for DecomposableFoldingScheme<'a, CF>where <CF as FoldingConfig>::Challenge: Unpin, <CF as FoldingConfig>::Column: Unpin, <<CF as FoldingConfig>::Curve as AffineRepr>::ScalarField: Unpin, <CF as FoldingConfig>::Selector: Unpin, <CF as FoldingConfig>::Structure: Unpin,

§

impl<'a, CF> UnwindSafe for DecomposableFoldingScheme<'a, CF>where <CF as FoldingConfig>::Challenge: UnwindSafe, <CF as FoldingConfig>::Column: UnwindSafe, <<CF as FoldingConfig>::Curve as AffineRepr>::ScalarField: UnwindSafe, <CF as FoldingConfig>::Selector: UnwindSafe, <CF as FoldingConfig>::Srs: RefUnwindSafe, <CF as FoldingConfig>::Structure: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V