use super::{variables::Variables, WitnessCell};
use ark_ff::Field;
pub struct CopyShiftCell {
row: usize,
col: usize,
shift: u64,
}
impl CopyShiftCell {
pub fn create(row: usize, col: usize, shift: u64) -> Box<CopyShiftCell> {
Box::new(CopyShiftCell { row, col, shift })
}
}
impl<F: Field, const W: usize> WitnessCell<F, F, W> for CopyShiftCell {
fn value(&self, witness: &mut [Vec<F>; W], _variables: &Variables<F>, _index: usize) -> F {
F::from(2u32).pow([self.shift]) * witness[self.col][self.row]
}
}