I am trying to produce a patch with a new file (stuffle_algebra.py)
following this tutorial:
http://www.sagemath.org/doc/developer/walk_through.html#section-create-sandbox
When I run the command hg_sage.diff(), I get a blank file; moreover, I can
not save the commit message: when I answer Trac
this is clear..
Le dimanche 21 juillet 2013 16:19:37 UTC+2, Matthieu Deneufchâtel a écrit :
I am trying to produce a patch with a new file (stuffle_algebra.py)
following this tutorial:
http://www.sagemath.org/doc/developer/walk_through.html#section-create-sandbox
When I run the command
Thank you for your answer which was very useful. I have now another
problem.
In order to define the product of two primitive elements (P_l for l a
Lyndon word), I think I need the structure equivalent to that of the
CombinatorialFreeModule but in the case of monoids, something that others
I try to implement the Poincaré-Birkhoff-Witt basis of the free algebra.
I defined the elements of this basis and a function which gives the
expansion of an element of the free algebra on this basis; actually, it
returns a dictionary whose keys are monomials and whose values are the
In a recursive function, I use a dictionary (which contains the elements of
the expansion of the argument on another basis). Since each call to the
function needs the dictionary, I don't want the user to be forced to put
the dictionary as an argument (i.e. I want him to call to_pbw(elem)
. See http://effbot.org/zone/default-values.htm . If you
replace it with None do something like
if l is None:
l = {}
at the beginning of the function, then things should be okay.
--Mike
--Mike
On Sat, Jun 29, 2013 at 11:29 AM, Matthieu Deneufchâtel
matthieu...@yahoo.fr
that you are using it in. For example:
def foo(x):
from sage.some.module import Bar
Bar(x)
...
Best,
Travis
On Friday, June 21, 2013 3:54:51 PM UTC+2, Matthieu Deneufchâtel wrote:
I added the line
from sage.monoids.free_monoid import FreeMonoid
to the file combinat/words
I created a sandbox, modified the file free_monoid_element.py then rebuilt
the Sage library (see below) but the function I added is not known:
[matthieu@localhost sage-5.6]$ sage
--
| Sage Version 5.6, Release Date: 2013-01-21
already so imported.
John
On 21 June 2013 11:02, Matthieu Deneufchâtel
matthieu...@yahoo.frjavascript:
wrote:
I created a sandbox, modified the file free_monoid_element.py then
rebuilt
the Sage library (see below) but the function I added is not known:
[matthieu@localhost sage-5.6
Le vendredi 21 juin 2013 13:35:14 UTC+2, Jeroen Demeyer a écrit :
On 06/21/2013 12:20 PM, Matthieu Deneufch�tel wrote:
I added my function at the bottom of the file:
[matthieu@localhost monoids]$ less free_monoid_element.py | grep toword
def toword(self):
and tried to
I found the solution : the problem was that the definition of my function
was in the class free monoid element whereas it has to be written outside
if you want to import it.
Le vendredi 21 juin 2013 12:02:19 UTC+2, Matthieu Deneufchâtel a écrit :
I created a sandbox, modified the file
I added the line
from sage.monoids.free_monoid import FreeMonoid
to the file combinat/words/finite_word.py
and after I rebuilt the library, I get an error when I start Sage:
/home/matthieu/Documents/sage-5.6/local/lib/python2.7/site-packages/sage/combinat/words/finite_word.py
in module()
199
I wrote some functions about the free algebra on two
generators(bialgebra structure, some bases, scalar product...). I do
not know how to make the best of it and I think that my skills are not
good enough to add them to Sage myself.
Any feedback and/or collaboration would be welcome.
Here is my
I was told to post here some code that I wrote about the free algebra.
I do not know what is the best way to make it useful and would be
thankful for any advice. If someone is interested in a collaboration
to improve it or publish it, please let me know...
Matthieu Deneufchâtel
I tried to remove all the french expressions in my code.
## Lyndon words ##
import sage.combinat.lyndon_word as LW
## Shuffle product ##
from sage.combinat.words.shuffle_product import ShuffleProduct_w1w2 as
SP
## Combinatorial
Hello,
I don't know if I write to the right group. Please tell me if I am
wrong.
I try to install sage-combinat but it doesn't work.
I use Sage 4.7. I tried to use the command sage -combinat install in
the sage root directory and got the following error message:
[root@localhost sage]# sage
16 matches
Mail list logo