commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject Re: [math] Add methods opposite() and inverse() to o.a.c.m.FieldElement
Date Tue, 04 Oct 2011 19:43:23 GMT
On 10/3/11 8:22 PM, S├ębastien Brisard wrote:
> Good morning everyone,
> I would like to add the above mentioned methods to FieldElement. This
> would avoid awkward commands such as
> x.getField().getZero().substract(x) (for x.opposite())
> and
> x.getField().getOne().divide(x) (for x.invert()).
> It's not essential, but I think it would be useful. Besides, I don't
> think it would bloat the interface, since opposite and inverse are
> mathematical notions which are intrinsic to fields.
> What do you think?

+1 to add both of these, though I would suggest one of the following
pairs of names:
0) negate, invert
1) opposite, reciprocal
2) additiveInverse, multiplicativeInverse

Probably 2) is clearest, but a bit long.  I am fine with any of them.

Phil
> Best regards,
> S├ębastien
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message