Implementation of two different strategies for calculation of search length.

@norihiro-w I am unsure about your comment. Do you think the design of the class hierarchy is wrong and should be changed or do you suggest an alternative to implement it?