pub struct AllocatedNonNativeFieldMulResultVar<TargetField: PrimeField, BaseField: PrimeField> {
pub cs: ConstraintSystemRef<BaseField>,
pub limbs: Vec<FpVar<BaseField>>,
pub prod_of_num_of_additions: BaseField,
/* private fields */
}
Expand description
The allocated form of NonNativeFieldMulResultVar
(introduced below)
Fields§
§cs: ConstraintSystemRef<BaseField>
Constraint system reference
limbs: Vec<FpVar<BaseField>>
Limbs of the intermediate representations
prod_of_num_of_additions: BaseField
The cumulative num of additions
Implementations§
source§impl<TargetField: PrimeField, BaseField: PrimeField> AllocatedNonNativeFieldMulResultVar<TargetField, BaseField>
impl<TargetField: PrimeField, BaseField: PrimeField> AllocatedNonNativeFieldMulResultVar<TargetField, BaseField>
sourcepub fn cs(&self) -> ConstraintSystemRef<BaseField>
pub fn cs(&self) -> ConstraintSystemRef<BaseField>
Get the CS
sourcepub fn value(&self) -> R1CSResult<TargetField>
pub fn value(&self) -> R1CSResult<TargetField>
Get the value of the multiplication result
sourcepub fn reduce(
&self
) -> R1CSResult<AllocatedNonNativeFieldVar<TargetField, BaseField>>
pub fn reduce(
&self
) -> R1CSResult<AllocatedNonNativeFieldVar<TargetField, BaseField>>
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: &TargetField) -> R1CSResult<Self>
pub fn add_constant(&self, other: &TargetField) -> R1CSResult<Self>
Add native constant elem
Trait Implementations§
source§impl<TargetField: Debug + PrimeField, BaseField: Debug + PrimeField> Debug for AllocatedNonNativeFieldMulResultVar<TargetField, BaseField>
impl<TargetField: Debug + PrimeField, BaseField: Debug + PrimeField> Debug for AllocatedNonNativeFieldMulResultVar<TargetField, BaseField>
source§impl<TargetField: PrimeField, BaseField: PrimeField> From<&AllocatedNonNativeFieldVar<TargetField, BaseField>> for AllocatedNonNativeFieldMulResultVar<TargetField, BaseField>
impl<TargetField: PrimeField, BaseField: PrimeField> From<&AllocatedNonNativeFieldVar<TargetField, BaseField>> for AllocatedNonNativeFieldMulResultVar<TargetField, BaseField>
source§fn from(src: &AllocatedNonNativeFieldVar<TargetField, BaseField>) -> Self
fn from(src: &AllocatedNonNativeFieldVar<TargetField, BaseField>) -> Self
Converts to this type from the input type.