Expand description
Helper functions to convert between vanilla array and variants.
This is the module-level documentation.
Functionsยง
- d1z_
to_ vanilla - Reverse the delta and zigzag transformation (
vanilla_to_d1z). - d1z_
to_ vanilla_ self - Same as
d1z_to_vanilla()but modify the original array. - m1_
to_ vanilla - Add 1 to each value.
- m1_
to_ vanilla_ self - Same as
m1_to_vanilla()but modify the original array. - vanilla_
to_ d1z - Transforms the original input into the difference between consecutive values, then zigzag it. If $x > 0$, $zigzag(x) = 2x$, while $x < 0$, $zigzag(x) = -2x - 1$.
- vanilla_
to_ d1z_ self - Same as
vanilla_to_d1z()but modify the original array. - vanilla_
to_ m1 - Substract 1 from each value.
- vanilla_
to_ m1_ self - Same as
vanilla_to_m1()but modify the original array.