hex.pointers.advance_by_one_and_flip__ptr_wflip

Advances *to_flip by 1 (which takes n flips, from bit0 to bit1, bit2,…).
If do_flip (value) isn’t 0 - then make a flip, like: to_flip;advance.

Signature

def advance_by_one_and_flip__ptr_wflip n, do_flip @ cleanup, advance < hex.pointers.to_flip { ... }

Defined in hex/pointers/xor_to_pointer.fj — lines 161–170 (view on GitHub).

Complexity

  • Time: @+n+1

  • Space: @+n+1

See the complexity glossary for what @, w, dw, dbit, n mean.

Source

Depends on


← Previous: hex.ptr_wflip Next: hex.ptr_wflip_2nd_word