sp1_hypercube/air/interaction.rs
1use serde::{Deserialize, Serialize};
2
3use crate::lookup::InteractionKind;
4
5/// An interaction is a cross-table lookup.
6#[derive(Debug, Clone, Serialize, Deserialize)]
7pub struct AirInteraction<E> {
8 /// The values of the interaction.
9 pub values: Vec<E>,
10 /// The multiplicity of the interaction.
11 pub multiplicity: E,
12 /// The kind of interaction.
13 pub kind: InteractionKind,
14}
15
16impl<E> AirInteraction<E> {
17 /// Create a new [`AirInteraction`].
18 pub const fn new(values: Vec<E>, multiplicity: E, kind: InteractionKind) -> Self {
19 Self { values, multiplicity, kind }
20 }
21}