On Tue, Jun 07, 2011 at 09:29:45AM -0400, Christian Stump wrote:
> dict_addition and dict_linear_combination expect all values living in
> a common ring. So testing val == zero should not involve coercion,
> should it?

Good point: the coercion code will instantly delegate the work to
equality test. I don't remember: do we have a cython equality test for
CombinatorialFreeModule? Isn't this going to call a python method at
the end of the day, just as is_zero?

> >     for_removal = (key for key in D if D[key] == zero)
> 
> cython doesn't yet support iterators

Arr, right. Well, that's comming soon.

> calling D.keys() tents to construct a much longer list than  [key for
> key in D if D[key] == zero].

Sorry, I indeed meant:

   for key in D:
      if D[key] == zero:
          del D[key]

> Anyway, I will benchmark the differences...

Thanks!

Cheers,
                                Nicolas
--
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 post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to