Hi Simon,

Thanks for getting in touch,

On Wed, Mar 29, 2017 at 02:34:28PM +0000, Simon King wrote:
> Just to make people aware: 9 years ago, it was decided to
> override Parent.__contains__ for CombinatorialFreeModule,
> thus working around Sage's coercion framework. I guess we
> should try to remove the custom CombinatorialFreeModule.__contains__,
> which is why I created #22707 (the branch hasn't been tested yet).

I commented on the ticket.

> Also, I think it is time to let FreeAlgebra(...) return
> some implementation of a free algebra with decently fast
> arithmetics. ...
> if free algebras were implemented as the path algebra of a digraph 
> with one vertex. I created #22708, but it has no branch yet.
> 
> Do you have objections against using path algebras, provided
> that they have the same features as the current default implementation
> of free algebras (I didn't check, yet)?

Wee, a 20x speedup is certainly nice :-)

The features should of course include all the little things of free
modules: accessors to retrieve like leading_term, (triangular) module
morphisms, etc.

> The default implementation of free algebra elements is some generic
> Python code ...

This is slightly misleading: the linear arithmetic on combinatorial
free modules elements has been cythonized for a while, and Travis has
just finished Cythonizing combinatorial free module elements: #22632.

It would be interesting to know specifically on which aspects the path
algebra is improving on the current free algebra. The data structure
of indices (i.e. words in the generators)? The data structure for
representing linear combinations? The implementation of the product?

Maybe some of those improvements could be lifted up to FreeModule in
the first place, or provide an alternative generic implementation of
it that would work better for your use case [1].

Cheers,
                Nicolas

PS: It's been a while that we have been longing for having several
implementations of FreeModule to choose from depending on the use
case; we had 3-4 such implementations in MuPAD-Combinat back in 2004 :-)


--
Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net>
http://Nicolas.Thiery.name/

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to