pub struct ArithCircuit<F: Field> { /* private fields */ }
Expand description
A simple circuit representation of an arithmetic expression.
This implementation isn’t optimized for performance, but rather for simplicity to allow easy conversion and preservation of the
Implementations§
Source§impl<F: Field> ArithCircuit<F>
impl<F: Field> ArithCircuit<F>
Sourcepub fn steps(&self) -> &[ArithCircuitStep<F>]
pub fn steps(&self) -> &[ArithCircuitStep<F>]
Steps of the circuit.
pub fn degree(&self) -> usize
pub fn n_vars(&self) -> usize
pub fn binary_tower_level(&self) -> usizewhere
F: TowerField,
pub fn convert_field<FTgt: Field + From<F>>(&self) -> ArithCircuit<FTgt>
pub fn try_convert_field<FTgt: Field + TryFrom<F>>( &self, ) -> Result<ArithCircuit<FTgt>, <FTgt as TryFrom<F>>::Error>
pub fn remap_vars(&self, indices: &[usize]) -> Result<Self, Error>
Trait Implementations§
Source§impl<F: Clone + Field> Clone for ArithCircuit<F>
impl<F: Clone + Field> Clone for ArithCircuit<F>
Source§fn clone(&self) -> ArithCircuit<F>
fn clone(&self) -> ArithCircuit<F>
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<F: Field + DeserializeBytes> DeserializeBytes for ArithCircuit<F>
impl<F: Field + DeserializeBytes> DeserializeBytes for ArithCircuit<F>
fn deserialize(
read_buf: impl Buf,
mode: SerializationMode,
) -> Result<Self, SerializationError>where
Self: Sized,
Source§impl<F: Field, FTgt: Field + From<F>> From<&ArithCircuit<F>> for ArithExpr<FTgt>
impl<F: Field, FTgt: Field + From<F>> From<&ArithCircuit<F>> for ArithExpr<FTgt>
Source§fn from(circuit: &ArithCircuit<F>) -> Self
fn from(circuit: &ArithCircuit<F>) -> Self
Converts to this type from the input type.
Source§impl<F: Field + SerializeBytes> SerializeBytes for ArithCircuit<F>
impl<F: Field + SerializeBytes> SerializeBytes for ArithCircuit<F>
fn serialize( &self, write_buf: impl BufMut, mode: SerializationMode, ) -> Result<(), SerializationError>
impl<F: Eq + Field> Eq for ArithCircuit<F>
impl<F: Field> StructuralPartialEq for ArithCircuit<F>
Auto Trait Implementations§
impl<F> Freeze for ArithCircuit<F>
impl<F> RefUnwindSafe for ArithCircuit<F>
impl<F> Send for ArithCircuit<F>
impl<F> Sync for ArithCircuit<F>
impl<F> Unpin for ArithCircuit<F>
impl<F> UnwindSafe for ArithCircuit<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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