On 11/10/2008 11:36 AM, Martin Rubey wrote: > Ralf Hemmecke <[EMAIL PROTECTED]> writes: > >>> I think that this was a bad idea anyway, since it is confusing to have also >>> the >>> coefficient function from AbelianMonoidRing(R: Ring,E: OrderedAbelianMonoid) >>> where >>> >>> coefficient(s, monomial(2, y)$IndexedExponents(Var)) yields just 1. I.e., >>> the >>> coefficient of y^2 x^0. >>> >>> (not implemented either) >> I do not really consider it bad (except from not being implemented at >> all). The function signatures are different, so it should be clear what >> one gets for either function call. > > Well, I think that only "morally" equal functions should share names. > Although > this is very vague indeed. I'd expect that two functions of the same name, > one > taking a list of variables and a list of exponents which together specify a > monomial (and which I personally consider bad practice already, but anyway), > and the other taking a monomial in the form of IndexedExponents should yield > the *same* result.
Oh, I am sorry. I would also ban coefficient: (%, List Var, List NNI) -> % (*1) and instead change coefficient: (%, IndexedExponents Var) -> Coef (*2) to return %. But I am not totally convinced. Having two lists in the argument is bad. I'd rather prefer something like coefficient: (%, List Cross(Var, NNI)) -> % Here the return type % is fine. Also (*2) is not totally optimal. Suppose you power series contains x and y and you give IndexedExponents that only involve x. The return type should then be % instead of Coef. Ralf --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" 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/fricas-devel?hl=en -~----------~----~----~----~------~----~------~--~---
