Hi Travis,

On 2017-03-31, Travis Scrimshaw <tsc...@ucdavis.edu> wrote:
> I agree that this is something that should be fixed (actually 0 is not 
> recognized as being in a CFM, which is a bug IMO).

AFTER the fix from #22707?

> Well, we do have a number of CFM subclasses that explicitly have a total 
> ordering of the indices (e.g., symmetric functions and partitions by lex 
> order). However, I could see this being slower than as dicts for elements 
> with a lot of terms when you have to, e.g., add two elements: you have to 
> sort the two chains (which my interpretation of your description is a chain 
> is a singlely linked list).

Yes, addition is a problem with elements that are implemented as sorted lists,
but currently even the addition of big path algebra elements is faster than
addition of the corresponding free algebra elements:

 sage: R.<x,y,z> = FreeAlgebra(QQ)
 sage: f = (x+y+z-1)^7
 sage: g = (x-y+z+1)^7
 sage: %timeit f+g
 1 loop, best of 3: 155 ms per loop
 sage: P = DiGraph({1:{1:['x','y','z']}}).path_semigroup().algebra(QQ)
 sage: P.inject_variables()
 Defining e_1, x, y, z
 sage: f = (x+y+z-1)^7
 sage: g = (x-y+z+1)^7
 sage: %timeit f+g
 1000 loops, best of 3: 1.35 ms per loop

Best regards,
Simon

-- 
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