The question was: out of that fractal structure given depth & line index:
Output indices for (let's call this level) $level = $max, $level = $max-1, $level = $max -2 untill some condition has been met. In my environment, this condition will be met at level 0, or 1 or 2 in most cases, so checking the indice for low levels without building too much may be faster.
I've done this by two different methods. The first one involves building the whole structure for each line, and then goes into it and checks indices.
The second one involves having lines as base 4 indexes into a nested structure, then look at the closest ones. For that second method (possibly faster) I've used both Algorithm::Loops & Math::Combinatorics.
Yet I am not happy with runtime... I'm curious whether this can be optimized using the fractal structure and your code.
:-)
Frank
In reply to Re^6: Fractal structure: PDL, memory, time
by FFRANK
in thread Fractal structure: PDL, memory, time
by FFRANK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |