That's clear: a jump at every 2**(1..$n) length of the array. The jump is to 3 times the array_length at the jump. So now we can deduct the perl source code from this {grin}.Simple: max_offset 1600 ++----------+----------+-----------+-----------+----------+----- +-----++ + + + + +'/tmp/out.txt'** +***** + 1400 ++ * + ++ | * + | | * + | 1200 ++ * + ++ | * + | 1000 ++ * + ++ | * + | 800 ++ * + ++ | ****** * + | | * ********** * + | 600 ++ * *********** * + ++ | * ****** + | 400 ++ * * + ++ | *********** * + | | * ****** + | 200 ++ ********* + ++ + * **** + * + + + + + + 0 *****-------+----------+-----------+-----------+----------+----- +-----++ 0 100 200 300 400 500 + 600 array_length Better axes: max_offset / array_length 9 ++------+-------+-------+-------+--------+-------+-------+-------+- +-----++ + + + + + + +'/tmp/out2.txt'+* +***** + 8 ++ * + ++ | * * + | | * * + | 7 ++ * * + ++ | * * + | 6 +* * + ++ |* * + | 5 *+ * + ++ | * + | | * + | 4 ++ * + ++ | ** + | 3 ++ * * * ** * * * + ++ | ** ** ** *** ** ** ** + | | * * * * ** * ** **** **** * + | 2 ++ * * ** * *** * ** * ** * *** * + ++ + + + ** *+ ** * ****+ ****+ ** * **** + + 1 ++------+-------+-----**+------**------**+-----**+------**------**- +-----++ 1 2 3 4 5 6 7 8 9 + 10 log2( array_length)
There are small deviations due to the poor representation of lines on the ASCII field. For smaller array lengths, this relation does not hold.
Jeroen
"We are not alone"(FZ)
In reply to Re: Re (tilly) 3: alternating row colors
by jeroenes
in thread alternating row colors
by qball
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |