Skip to main content

MultilinearExtension

Trait MultilinearExtension 

Source
pub trait MultilinearExtension<T>:
    Sized
    + Clone
    + Debug
    + PartialEq
    + Eq
    + Add
    + for<'a> AddAssign<&'a Self>
    + for<'a> AddAssign<(T, &'a Self)>
    + for<'a> SubAssign<&'a Self> {
    // Required methods
    fn fix_variables<S>(&mut self, partial_point: &[S], zero: T)
       where T: for<'a> MulByScalar<&'a S>;
    fn fixed_variables<S>(&self, partial_point: &[S], zero: T) -> Self
       where T: for<'a> MulByScalar<&'a S>;
}
Expand description

This trait describes an interface for the multilinear extension of an array. The latter is a multilinear polynomial represented in terms of its evaluations over the domain {0,1}^num_vars (i.e. the Boolean hypercube).

Index represents a point, which is a vector in {0,1}^num_vars in little endian form. For example, 0b1011 represents P(1,1,0,1)

Required Methods§

Source

fn fix_variables<S>(&mut self, partial_point: &[S], zero: T)
where T: for<'a> MulByScalar<&'a S>,

Reduce the number of variables of self by fixing the partial_point.len() variables at partial_point.

Source

fn fixed_variables<S>(&self, partial_point: &[S], zero: T) -> Self
where T: for<'a> MulByScalar<&'a S>,

Creates a new object with the number of variables of self reduced by fixing the partial_point.len() variables at partial_point.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<R> MultilinearExtension<R> for DenseMultilinearExtension<R>
where R: Semiring,