Adam-Vandervorst / PyBHV

Boolean Hypervectors with various operators for experiments in hyperdimensional computing (HDC).
GNU General Public License v3.0
20 stars 5 forks source link

Permutation rewrite rules #17

Closed AnnelineD closed 10 months ago

AnnelineD commented 10 months ago

Added an identity permutation Added following rules for simplifying:

Consecutively calling the methods shred and simplify on an expression results in a "normal form" (ignoring Xor commutativity and potential permute commutativety for now) ; a tree of maj over xor over perm over var.

Adam-Vandervorst commented 10 months ago

I'll look into how to extend this addition to .permute(p), but this can already be merged, thanks!