use super::permutation::{ExternalMatrix, InternalMatrix};
use ark_ff::Field;
fn internal_matrix_3<F: Field>(state: &[F; 3]) -> [F; 3] {
let sum = state[0] + state[1] + state[2];
[sum + state[0], sum + state[1], sum + state[2].double()]
}
pub struct InternalMatrix3;
impl<F: Field> InternalMatrix<F, 3> for InternalMatrix3 {
fn apply(state: &mut [F; 3]) {
internal_matrix_3(state);
}
}
impl<F: Field> ExternalMatrix<F, 3> for InternalMatrix3 {
fn apply(state: &mut [F; 3]) {
internal_matrix_3(state);
}
}