pub trait LcEncoding: Clone + Debug + Sync {
    type F: Field + FieldHash + Debug + Clone;
    type Err: Debug + Error + Send;

    const LABEL_DT: &'static [u8];
    const LABEL_PR: &'static [u8];
    const LABEL_PE: &'static [u8];
    const LABEL_CO: &'static [u8];

    fn encode<T: AsMut<[Self::F]>>(&self, inp: T) -> Result<(), Self::Err>;
fn get_dims(&self, len: usize) -> (usize, usize, usize);
fn dims_ok(&self, n_per_row: usize, n_cols: usize) -> bool;
fn get_n_col_opens(&self) -> usize;
fn get_n_degree_tests(&self) -> usize; }
Expand description

Trait for a linear encoding used by the polycommit

Associated Types

Field over which coefficients are defined

Error type for encoding

Associated Constants

Domain separation label - degree test (see def_labels!())

Domain separation label - random lin combs (see def_labels!())

Domain separation label - eval comb (see def_labels!())

Domain separation label - column openings (see def_labels!())

Required methods

Encoding function

Get dimensions for this encoding instance on an input vector of length len

Check that supplied dimensions are compatible with this encoding

Get the number of column openings required for this encoding

Get the number of degree tests required for this encoding

Implementors