Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

I translated the algorithm in C++. Here is the naive implementation (your can find the corresponding C version herehere):

I translated the algorithm in C++. Here is the naive implementation (your can find the corresponding C version here):

I translated the algorithm in C++. Here is the naive implementation (your can find the corresponding C version here):

replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
Source Link

Note: if you found this Q&A interesting an are interesting in another algorithm to add Gray codes, I made another Q&Aanother Q&A about a custom algorithm to add Gray codes based on a powers of \$2\$ decomposition.

Note: if you found this Q&A interesting an are interesting in another algorithm to add Gray codes, I made another Q&A about a custom algorithm to add Gray codes based on a powers of \$2\$ decomposition.

Note: if you found this Q&A interesting an are interesting in another algorithm to add Gray codes, I made another Q&A about a custom algorithm to add Gray codes based on a powers of \$2\$ decomposition.

Mention Harold Lucal
Source Link
Morwenn
  • 20.2k
  • 3
  • 69
  • 132

My addition algorithm is based on the pseudo-code algorithm provided in this paper by R. W. Doran (am I the only one there thinking of Dorian Gray?), and attributed to Harold Lucal. Here is the original pseudo-code addition algorithm ( means xor):

My addition algorithm is based on the pseudo-code algorithm provided in this paper by R. W. Doran (am I the only one there thinking of Dorian Gray?). Here is the original pseudo-code addition algorithm ( means xor):

My addition algorithm is based on the pseudo-code algorithm provided in this paper by R. W. Doran (am I the only one there thinking of Dorian Gray?), and attributed to Harold Lucal. Here is the original pseudo-code addition algorithm ( means xor):

All-caps seemed a bit aggressive...
Source Link
Morwenn
  • 20.2k
  • 3
  • 69
  • 132
Loading
Remove some elements that have been moved to the self-answer.
Source Link
Morwenn
  • 20.2k
  • 3
  • 69
  • 132
Loading
Couldn't resist any longer, sorry.
Source Link
Morwenn
  • 20.2k
  • 3
  • 69
  • 132
Loading
The naive algorithm is still far more than five times faster.
Source Link
Morwenn
  • 20.2k
  • 3
  • 69
  • 132
Loading
Replaced link to deleted answer by link to article.
Source Link
Morwenn
  • 20.2k
  • 3
  • 69
  • 132
Loading
Tweeted twitter.com/#!/StackCodeReview/status/530594823514763264
edited tags
Link
200_success
  • 145.6k
  • 22
  • 191
  • 481
Loading
Source Link
Morwenn
  • 20.2k
  • 3
  • 69
  • 132
Loading