kimchi/circuits/witness/
copy_cell.rs1use alloc::{boxed::Box, vec::Vec};
2use ark_ff::Field;
3
4use super::{variables::Variables, WitnessCell};
5
6pub struct CopyCell {
8 row: usize,
9 col: usize,
10}
11
12impl CopyCell {
13 pub fn create(row: usize, col: usize) -> Box<CopyCell> {
15 Box::new(CopyCell { row, col })
16 }
17}
18
19impl<F: Field, const W: usize> WitnessCell<F, F, W> for CopyCell {
20 fn value(&self, witness: &mut [Vec<F>; W], _variables: &Variables<F>, _index: usize) -> F {
21 witness[self.col][self.row]
22 }
23}