Skip to main content

Module fold

Module fold 

Source
Expand description

Fixing the highest variable of a multilinear to a value.

Fixing one variable of an n-variate multilinear leaves an (n-1)-variate one:

g(X_0, ..., X_{n-2}) = f(X_0, ..., X_{n-2}, r)

Coefficients are stored with the highest variable selecting which half of the buffer a coefficient falls in. So fixing the highest variable pairs the two halves and leaves the result in the first one.

Functionsยง

binary_fold_high
Overwrites a buffer with the high fold of a bit sequence by a tensor.
fold_highest_var
Fixes the highest variable of a multilinear to a value, writing into memory from an allocator.
fold_highest_var_inplace
Fixes the highest variable of a multilinear to a value, in place.