Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
2
Task/Gray-code/APL/gray-code-1.apl
Normal file
2
Task/Gray-code/APL/gray-code-1.apl
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
N←5
|
||||
({(0,⍵)⍪1,⊖⍵}⍣N)(1 0⍴⍬)
|
||||
5
Task/Gray-code/APL/gray-code-2.apl
Normal file
5
Task/Gray-code/APL/gray-code-2.apl
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
N←5
|
||||
grayEncode←{a≠N↑(0,a←(N⍴2)⊤⍵)}
|
||||
grayDecode←{2⊥≠⌿N N↑N(2×N)⍴⍵,0,N⍴0}
|
||||
|
||||
grayEncode 19
|
||||
Loading…
Add table
Add a link
Reference in a new issue