pub struct AllocatedMulResultVar<TargetF: PrimeField, BaseF: PrimeField> {
pub cs: ConstraintSystemRef<BaseF>,
pub limbs: Vec<FpVar<BaseF>>,
pub prod_of_num_of_additions: BaseF,
/* private fields */
}
Expand description
The allocated form of MulResultVar
(introduced below)
Fields§
§cs: ConstraintSystemRef<BaseF>
Constraint system reference
limbs: Vec<FpVar<BaseF>>
Limbs of the intermediate representations
prod_of_num_of_additions: BaseF
The cumulative num of additions
Implementations§
Source§impl<TargetF: PrimeField, BaseF: PrimeField> AllocatedMulResultVar<TargetF, BaseF>
impl<TargetF: PrimeField, BaseF: PrimeField> AllocatedMulResultVar<TargetF, BaseF>
Sourcepub fn cs(&self) -> ConstraintSystemRef<BaseF>
pub fn cs(&self) -> ConstraintSystemRef<BaseF>
Get the CS
Sourcepub fn value(&self) -> R1CSResult<TargetF>
pub fn value(&self) -> R1CSResult<TargetF>
Get the value of the multiplication result
Sourcepub fn reduce(&self) -> R1CSResult<AllocatedEmulatedFpVar<TargetF, BaseF>>
pub fn reduce(&self) -> R1CSResult<AllocatedEmulatedFpVar<TargetF, BaseF>>
Constraints for reducing the result of a multiplication mod p, to get an original representation.
Sourcepub fn add(&self, other: &Self) -> R1CSResult<Self>
pub fn add(&self, other: &Self) -> R1CSResult<Self>
Add unreduced elements.
Sourcepub fn add_constant(&self, other: &TargetF) -> R1CSResult<Self>
pub fn add_constant(&self, other: &TargetF) -> R1CSResult<Self>
Add native constant elem
Trait Implementations§
Source§impl<TargetF: Debug + PrimeField, BaseF: Debug + PrimeField> Debug for AllocatedMulResultVar<TargetF, BaseF>
impl<TargetF: Debug + PrimeField, BaseF: Debug + PrimeField> Debug for AllocatedMulResultVar<TargetF, BaseF>
Source§impl<TargetF: PrimeField, BaseF: PrimeField> From<&AllocatedEmulatedFpVar<TargetF, BaseF>> for AllocatedMulResultVar<TargetF, BaseF>
impl<TargetF: PrimeField, BaseF: PrimeField> From<&AllocatedEmulatedFpVar<TargetF, BaseF>> for AllocatedMulResultVar<TargetF, BaseF>
Source§fn from(src: &AllocatedEmulatedFpVar<TargetF, BaseF>) -> Self
fn from(src: &AllocatedEmulatedFpVar<TargetF, BaseF>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<TargetF, BaseF> Freeze for AllocatedMulResultVar<TargetF, BaseF>where
BaseF: Freeze,
impl<TargetF, BaseF> !RefUnwindSafe for AllocatedMulResultVar<TargetF, BaseF>
impl<TargetF, BaseF> !Send for AllocatedMulResultVar<TargetF, BaseF>
impl<TargetF, BaseF> !Sync for AllocatedMulResultVar<TargetF, BaseF>
impl<TargetF, BaseF> Unpin for AllocatedMulResultVar<TargetF, BaseF>
impl<TargetF, BaseF> !UnwindSafe for AllocatedMulResultVar<TargetF, BaseF>
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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