MCPcopy Create free account
hub / github.com/PolyhedraZK/ExpanderCompilerCollection / Field

Interface Field

expander_compiler/src/field.rs:8–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6use serdes::ExpSerde;
7
8pub trait Field: FieldArith + ExpSerde {
9 fn optimistic_inv(&self) -> Option<Self> {
10 if self.is_zero() {
11 None
12 } else if *self == Self::ONE {
13 Some(Self::ONE)
14 } else {
15 self.inv()
16 }
17 }
18}
19
20impl Field for BN254Fr {}
21impl Field for GF2 {}

Callers 18

fix_mid_to_outMethod · 0.80
strip_constantsFunction · 0.80
make_singleMethod · 0.80
make_really_singleMethod · 0.80
strip_constantsFunction · 0.80
AssertIsBooleanMethod · 0.45
newBuilderMethod · 0.45
evalSubMethod · 0.45
FromInterfaceFunction · 0.45
PrintMethod · 0.45
MemorizedCallMethod · 0.45
ReadUint64Method · 0.45

Implementers 4

Fieldecgo/field/gf2/field.go
Fieldecgo/field/bn254/field_wrapper.go
Fieldecgo/field/m31/field.go
field.rsexpander_compiler/src/field.rs

Calls

no outgoing calls

Tested by

no test coverage detected