#7692: update the sloane OEIS database to the latest version; it is a little out
of date.
---------------------------------+------------------------------------------
Reporter: was | Owner: tbd
Type: enhancement | Status: needs_work
Priority: minor | Milestone: sage-4.3.1
Component: optional packages | Keywords:
Work_issues: | Author:
Upstream: N/A | Reviewer:
Merged: |
---------------------------------+------------------------------------------
Comment(by was):
More readable version:
I completely forgot that the array size was hardcoded in
SloaneEncyclopediaClass -- this is what caused the error, since now the
number of entries is bigger than the array size. There's a bizarre new
issue with numbering, though: most of the online sequences are
sequentially numbered, but in the version I downloaded last night the
sequential numbers end at A175062 and then there's a single sequence,
A557274, after that. (To check the numbers in your database file, run "cut
-d' ' -f1 sloane-oeis | head".)
The two best fixes I have in mind, other than getting Sloane to renumber
that one extra sequence, are to replace SloaneEncyclopediaClass.__data__
with a hashtable whose keys are the indices and to let it be a huge array
whose last index is 557274. The first might be slower, but the second one
will require storing almost 400000 extra "None" entries in the __data__
array, and they'll have to be iterated through and ignored in the find()
method.
If we stick to using an array instead of a hash table, then probably the
right thing to do as far as the array size is to add a line to the update-
sloane script: something like
{{{
cut -d' ' -f1 sloane-oeis | sort -r | head -1 | sed 's/A//' > sloane-
maxseq
}}}
where sloane-oeis is the unzipped encyclopedia file, to write the maximal
sequence number (in this case, 557274) to a file sloane-maxseq. Then the
SloaneEncyclopediaClass.load() method could read this number (plus one)
from the sloane-maxseq file into the variable self.__arraysize__ before it
creates self.__data__, and continue as normal.
Which of these do you think is the best way to proceed?
Steven
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7692#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.