In the "checkneighbour" function, first all the neighbours of the n-cubes are generated, and the non-bracketing are filtered out.
Then the neighbours of the "new bracketing n-cubes" are analysed in a while loop.
However, it is possible, that the neighbour of a "new bracketing n-cubes" were checked before (as a neighbour of the original n-cube). This will not lead to extra function evaluation due to the memoization, however the interpolation will be carried out multiple times.
In the "checkneighbour" function, first all the neighbours of the n-cubes are generated, and the non-bracketing are filtered out. Then the neighbours of the "new bracketing n-cubes" are analysed in a while loop. However, it is possible, that the neighbour of a "new bracketing n-cubes" were checked before (as a neighbour of the original n-cube). This will not lead to extra function evaluation due to the memoization, however the interpolation will be carried out multiple times.