pub struct DenseMultilinearExtension<F: Field> {
    pub evaluations: Vec<F>,
    pub num_vars: usize,
}
Expand description

Stores a multilinear polynomial in dense evaluation form.

Fields

evaluations: Vec<F>

The evaluation over {0,1}^num_vars

num_vars: usize

Number of variables

Implementations

Construct a new polynomial from a list of evaluations where the index represents a point in {0,1}^num_vars in little endian form. For example, 0b1011 represents P(1,1,0,1)

Construct a new polynomial from a list of evaluations where the index represents a point in {0,1}^num_vars in little endian form. For example, 0b1011 represents P(1,1,0,1)

Relabel the point in place by switching k scalars from position a to position b, and from position b to position a in vector.

This function turns P(x_1,...,x_a,...,x_{a+k - 1},...,x_b,...,x_{b+k - 1},...,x_n) to P(x_1,...,x_b,...,x_{b+k - 1},...,x_a,...,x_{a+k - 1},...,x_n)

Returns an iterator that iterates over the evaluations over {0,1}^num_vars

Returns a mutable iterator that iterates over the evaluations over {0,1}^num_vars

Trait Implementations

The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
The general deserialize method that takes in customization flags.
The general serialize method that takes in customization flags.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more

Returns the evaluation of the polynomial at a point represented by index.

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

For dense multilinear polynomial, index takes constant time.

The returned type after indexing.
Returns the number of variables in self
Evaluates self at the given the vector point in slice. If the number of variables does not match, return None. Read more
Outputs an l-variate multilinear extension where value of evaluations are sampled uniformly at random. Read more
Relabel the point by swapping k scalars from positions a..a+k to positions b..b+k, and from position b..b+k to position a..a+k in vector. Read more
Reduce the number of variables of self by fixing the partial_point.len() variables at partial_point. Read more
Returns a list of evaluations over the domain, which is the boolean hypercube. Read more
The resulting type after applying the - operator.
Performs the unary - operation. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Returns the additive identity element of Self, 0. Read more
Returns true if self is equal to the additive identity.
Sets self to the additive identity element of Self, 0.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.