github.com/consensys/gnark@v0.11.0/internal/backend/circuits/assertisdifferent.go (about) 1 package circuits 2 3 import ( 4 "github.com/consensys/gnark/frontend" 5 ) 6 7 type assertIsDifferentCircuit struct { 8 X frontend.Variable 9 Y frontend.Variable `gnark:",public"` 10 } 11 12 func (circuit *assertIsDifferentCircuit) Define(api frontend.API) error { 13 api.AssertIsDifferent(circuit.X, circuit.Y) 14 return nil 15 } 16 17 func init() { 18 19 good := []frontend.Circuit{ 20 &assertIsDifferentCircuit{ 21 X: (6), 22 Y: (37), 23 }, 24 } 25 26 bad := []frontend.Circuit{ 27 &assertIsDifferentCircuit{ 28 X: (6), 29 Y: (6), 30 }, 31 } 32 33 addNewEntry("assert_different", &assertIsDifferentCircuit{}, good, bad, nil) 34 }