int (@Nullable AbstractBlockWrapper block) { if (block == null) { return myBlocks.size() - 1; } final int offset = block.getStartOffset(); if (myLastCalculatedOffset != -1) { if (offset >= myLastCalculatedOffset) { myLastCalculatedAnswerIndex = calcLeftRespNeighborIndexLinear(myLastCalculatedAnswerIndex, offset); myLastCalculatedOffset = offset; return myLastCalculatedAnswerIndex; } //Logger.getInstance(ProbablyIncreasingLowerboundAlgorithm.class).error("not very good!"); myLastCalculatedOffset = -1; } myLastCalculatedOffset = offset; return myLastCalculatedAnswerIndex = calcLeftRespNeighborIndex(offset); }