#10530: De Bruijn Sequence construction for combinat
---------------------------------+------------------------------------------
Reporter: eviatarbach | Owner: sage-combinat
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.6.1
Component: combinatorics | Keywords:
Author: Eviatar Bach | Upstream: N/A
Reviewer: Nicolas M. ThiƩry | Merged:
Work_issues: |
---------------------------------+------------------------------------------
Comment(by nthiery):
Replying to [comment:6 eviatarbach]:
> Append is marginally faster (by about one microsecond), probably
> because for the other I had to declare a global ''index'' variable
> in Python.
Interesting to know! Have you tried with large output? Say, a sequence of
length 10^5 or 10^6?
For the following, see also the discussion on:
http://groups.google.com/group/sage-combinat-
devel/browse_thread/thread/bf20e88681bc557b
> Let me get this straight:
>
> == Python ==
> Filename: debruijn_sequence.py
> Class name: DeBruijnSequence (DeBruijnSequences wouldn't make sense
since only one is generated)
Class name: DeBruijnSequences (it models the set of all such sequences)
Filename: debruijn_sequences.py (for consistency with the name of the
class; granted this convention is not yet followed consistently across
combinat; that should eventually be fixed)
> == Cython ==
> Filename: debruijn_sequence.pyx
> Function name: debruijn_sequence
+1
Possibly debruijn_sequences_cython.pyx in case you expect other
functionalities on de Bruijn sequences to be implemented in cython.
> Also, for some reason, when I use underscores in debruijn_sequence.py, I
get this error:
>
> {{{
> ImportError: dynamic module does not define init function
(initdebruijn_sequence)
> }}}
Hmm, as far as I know this should work. Please double check all
references to the f,ile and that everything was recompiled
properly. Also, there might be some old files that have not been
cleaned up and that cython tries to recompile.
Cheers,
Nicolas
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10530#comment:7>
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.