(j int)
| 173 | } |
| 174 | |
| 175 | func (t *table) unboundSearch(j int) int { |
| 176 | i := j |
| 177 | for j++; nil != t.atInt(j); { |
| 178 | i = j |
| 179 | if j *= 2; j < 0 { |
| 180 | for i = 1; nil != t.atInt(i); i++ { |
| 181 | } |
| 182 | return i - 1 |
| 183 | } |
| 184 | } |
| 185 | for j-i > 1 { |
| 186 | m := (i + j) / 2 |
| 187 | if nil == t.atInt(m) { |
| 188 | j = m |
| 189 | } else { |
| 190 | i = m |
| 191 | } |
| 192 | } |
| 193 | return i |
| 194 | } |
| 195 | |
| 196 | func (t *table) length() int { |
| 197 | j := len(t.array) |