June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
|
|
@ -1,9 +1,8 @@
|
|||
gray_encode(n) = n $ (n >> 1)
|
||||
|
||||
function gray_decode(n)
|
||||
p = n
|
||||
grayencode(n::Integer) = n ⊻ (n >> 1)
|
||||
function graydecode(n::Integer)
|
||||
r = n
|
||||
while (n >>= 1) != 0
|
||||
p $= n
|
||||
r ⊻= n
|
||||
end
|
||||
return p
|
||||
return r
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue