Oops, I meant to add this code:
On 1 April 2015 at 00:38, Bill Page <[email protected]> wrote:
> ...
>> We may add some test to give better
>> error message, but it should be cheap (like comparing index
>> with bound).
>
> Yes, that is quite easy:
rehashAux!(x: %, ix: Z): % ==
...
k: Key := toKey mk
-- Note that k is not in c, and there are no DELETED positions.
-- Thus, -m<=p<0.
- p := m + localSearch(c, k, h)
- setKeyEntry!(c, m, p, k, getEntry(a, n, i))
+ q := localSearch(c, k, h, eq)
+ if q<0 then
+ p := m + q
+ setKeyEntry!(c, m, p, k, getEntry(a, n, i))
+ else -- should not happen!
+ error "XHashTable rehashAux!: duplicate key"
r.arr := c --destructively set new array
r.idx := ix
r.maxNumOfEntries := maxLoad m
--
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.