walsh transform
This commit is contained in:
1 parent
3f93c074ef
commit
84fda8757c
5 files changed
+108
No files matched your search
@@ -0,0 +1,11 @@
|
||||
from walsh.walsh import walsh_transform
|
||||
|
||||
def test_walsh_xor_two_variables():
|
||||
assert walsh_transform("x1 XOR x2") == [0, 0, 0, 4]
|
||||
|
||||
def test_walsh_or_two_variables():
|
||||
assert walsh_transform("x1 OR x2") == [-2, 2, 2, 2]
|
||||
|
||||
|
||||
def test_walsh_xor_three_variables():
|
||||
assert walsh_transform("x1 XOR x2 XOR x3") == [0, 0, 0, 0, 0, 0, 0, 8]
|
||||
Reference in new issue
Block a user