66 int const sizeOfArray =
static_cast<int>(input_end_ - input_);
67 int const numberOfBlocs
68 =
static_cast<unsigned int>(log2(sizeOfArray + 1)) + 1;
71 table_.resize(sizeOfArray);
72 for(
int i = 0; i < sizeOfArray; i++) {
73 table_[i].resize(numberOfBlocs);
74 fill(table_[i].
begin(), table_[i].
end(), -1);
78 for(
int i = 0; i < sizeOfArray; i++) {
82 for(
int k = 1; ((1 << k) - 1) < sizeOfArray; k++) {
83 for(
int i = 0; (i + (1 << k) - 1) < sizeOfArray; i++) {
84 if(input_[table_[i][k - 1]]
85 <= input_[table_[i + (1 << (k - 1))][k - 1]]) {
86 table_[i][k] = table_[i][k - 1];
88 table_[i][k] = table_[i + (1 << (k - 1))][k - 1];