Hi Dan, first of all: thanks for looking at the patch!
> Unless someone has a better idea, or objects, maybe the patch should > just update the test result > in hopf_algebras_with_basis so that the test passes. I wait until tomorrow if someone has some idea, otherwise I will just update the test. > This function is only called once in all of sage, namely at the > end of dict_linear_combination. Would it be a good idea to inline > the code here to save the overhead of the function call? It is called at the end of dict_linear_combination and as well at the end of dict_addition. That's why I chose to make it an extra method. Do you recommend to put it back into those places to save the function call overhead (isn't this nanosecs)? > Similar code is inlined in the _from_dict method of > CombinatorialFreeModule. There the code is optional depending > on a parameter remove_zeros. At this position, calling the method would result in another iteration through dict.iteritems(), compare l. 1534 and l. 22. This might take a while in big cases, thus I didn't use the method in this place. > In some cases _from_dict is called on data that is direct > output of dict_linear_combination. This happens > in the _neg_ and _sub_ methods of CombinatorialFreeModule. > In those cases the zero removal is done twice. I am not > I think one could safely pass remove_zeros=False to _from_dict in > these two > places and maybe other places in the code. But I am not > necessarily recommending this. That's right, I gonna look for places where it is save to set remove_zeros=False. In general, an element in CombinatorialFreeModule should never have zero entries, but I do not know, if this is ensured everywhere. That's why I added remove_zeros also in places where it might not be necessary, see e.g. l. 437. Thanks again, I will upload the changes tomorrow, Christian -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" 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-combinat-devel?hl=en.
