-
Basically, the code below in a define function for a circuit. Similarly, I'm accessing a 2D array at this line: My question is: In general, or using this example, does it make sense in a circuit's define function to access a 2D array (i.e. the 2D array of pixels in this context) using a forloop like this? How would I go about setting/getting pixels in a 2D array, in an iterative manner? Thanks in advance!
Here's some extra context, please let me know if you need more info about this: const ( type ImageArea struct { type FrLocation struct { // An image with frontend pixels // Frontend pixels are made up of frontend.Variable instead of uint8. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
It does make sense! In your case it is simpler because you already define the size of the picture in the circuit definition I haven't run your example, but for now it looks good to me. If there is a compile/solver error, then it would help if you have a full running example which I could try out. |
Beta Was this translation helpful? Give feedback.
It does make sense! In your case it is simpler because you already define the size of the picture in the circuit definition
Pixels [N][N]FrontendPixel
where I assumeN
is a constant.I haven't run your example, but for now it looks good to me. If there is a compile/solver error, then it would help if you have a full running example which I could try out.