You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sébastien Brisard (Created JIRA)" <ji...@apache.org> on 2011/10/07 15:05:30 UTC

[jira] [Created] (MATH-686) Add methods negate() / reciprocal() to the FieldElement interface

Add methods negate() / reciprocal() to the FieldElement interface
-----------------------------------------------------------------

                 Key: MATH-686
                 URL: https://issues.apache.org/jira/browse/MATH-686
             Project: Commons Math
          Issue Type: New Feature
            Reporter: Sébastien Brisard
            Priority: Trivial
             Fix For: 3.0


As discussed on the mailing list, it is proposed to add two methods to the {{FieldElement}} interface
* {{negate()}} : returns the additive inverse of {{this}} element.
* {{reciprocal()}} : returns the multiplicative inverse of {{this}} element.

Several name couples have been proposed by Phil
# {{negate}}, {{invert}}
# {{opposite}}, {{reciprocal}}
# {{additiveInverse}}, {{multiplicativeInverse}}

Looking at the classes implementing this interface in the core CM library, we find that
* {{Complex}}, {{Dfp}}, {{BigFraction}} and {{Fraction}} already have a {{negate()}} method.
* Besides, {{BigFraction}} and {{Fraction}} already have a {{reciprocal()}} method.

So the best naming option would seem to be (for the time being) a mixture of what Phil proposed. I realize it's not completely satisfactory because one is a noun and one a verb. However that's what would induce the least changes to the CM library. As a second step, it will be easier to change consistently the names of all classes implementing {{FieldElement}}.

So I propose to introduce {{negate()}} and {{reciprocal()}} in the {{FieldElement}} interface.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Closed] (MATH-686) Add methods negate() / reciprocal() to the FieldElement interface

Posted by "Sébastien Brisard (Closed JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sébastien Brisard closed MATH-686.
----------------------------------


Fixed in 3.0.
                
> Add methods negate() / reciprocal() to the FieldElement interface
> -----------------------------------------------------------------
>
>                 Key: MATH-686
>                 URL: https://issues.apache.org/jira/browse/MATH-686
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Sébastien Brisard
>            Priority: Trivial
>             Fix For: 3.0
>
>
> As discussed on the mailing list, it is proposed to add two methods to the {{FieldElement}} interface
> * {{negate()}} : returns the additive inverse of {{this}} element.
> * {{reciprocal()}} : returns the multiplicative inverse of {{this}} element.
> Several name couples have been proposed by Phil
> # {{negate}}, {{invert}}
> # {{opposite}}, {{reciprocal}}
> # {{additiveInverse}}, {{multiplicativeInverse}}
> Looking at the classes implementing this interface in the core CM library, we find that
> * {{Complex}}, {{Dfp}}, {{BigFraction}} and {{Fraction}} already have a {{negate()}} method.
> * Besides, {{BigFraction}} and {{Fraction}} already have a {{reciprocal()}} method.
> So the best naming option would seem to be (for the time being) a mixture of what Phil proposed. I realize it's not completely satisfactory because one is a noun and one a verb. Do we want to have good grammar, or preserve what's already implemented? I tend to favour the first option (consistently change the name of existing methods).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Issue Comment Edited] (MATH-686) Add methods negate() / reciprocal() to the FieldElement interface

Posted by "Sébastien Brisard (Issue Comment Edited JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13123371#comment-13123371 ] 

Sébastien Brisard edited comment on MATH-686 at 10/8/11 4:23 AM:
-----------------------------------------------------------------

As discussed on the mailing list, retained option was {{negate()}}/{{reciprocal{}}. These methods were introduced in rev r1180312.
                
      was (Author: celestin):
    As discussed on the mailing list, retained option was {{negate()}}/{{reciprocal{}}. This method were introduced in rev r1180312.
                  
> Add methods negate() / reciprocal() to the FieldElement interface
> -----------------------------------------------------------------
>
>                 Key: MATH-686
>                 URL: https://issues.apache.org/jira/browse/MATH-686
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Sébastien Brisard
>            Priority: Trivial
>             Fix For: 3.0
>
>
> As discussed on the mailing list, it is proposed to add two methods to the {{FieldElement}} interface
> * {{negate()}} : returns the additive inverse of {{this}} element.
> * {{reciprocal()}} : returns the multiplicative inverse of {{this}} element.
> Several name couples have been proposed by Phil
> # {{negate}}, {{invert}}
> # {{opposite}}, {{reciprocal}}
> # {{additiveInverse}}, {{multiplicativeInverse}}
> Looking at the classes implementing this interface in the core CM library, we find that
> * {{Complex}}, {{Dfp}}, {{BigFraction}} and {{Fraction}} already have a {{negate()}} method.
> * Besides, {{BigFraction}} and {{Fraction}} already have a {{reciprocal()}} method.
> So the best naming option would seem to be (for the time being) a mixture of what Phil proposed. I realize it's not completely satisfactory because one is a noun and one a verb. Do we want to have good grammar, or preserve what's already implemented? I tend to favour the first option (consistently change the name of existing methods).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (MATH-686) Add methods negate() / reciprocal() to the FieldElement interface

Posted by "Sébastien Brisard (Updated JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sébastien Brisard updated MATH-686:
-----------------------------------

    Description: 
As discussed on the mailing list, it is proposed to add two methods to the {{FieldElement}} interface
* {{negate()}} : returns the additive inverse of {{this}} element.
* {{reciprocal()}} : returns the multiplicative inverse of {{this}} element.

Several name couples have been proposed by Phil
# {{negate}}, {{invert}}
# {{opposite}}, {{reciprocal}}
# {{additiveInverse}}, {{multiplicativeInverse}}

Looking at the classes implementing this interface in the core CM library, we find that
* {{Complex}}, {{Dfp}}, {{BigFraction}} and {{Fraction}} already have a {{negate()}} method.
* Besides, {{BigFraction}} and {{Fraction}} already have a {{reciprocal()}} method.

So the best naming option would seem to be (for the time being) a mixture of what Phil proposed. I realize it's not completely satisfactory because one is a noun and one a verb. Do we want to have good grammar, or preserve what's already implemented? I tend to favour the first option (consistently change the name of existing methods).

  was:
As discussed on the mailing list, it is proposed to add two methods to the {{FieldElement}} interface
* {{negate()}} : returns the additive inverse of {{this}} element.
* {{reciprocal()}} : returns the multiplicative inverse of {{this}} element.

Several name couples have been proposed by Phil
# {{negate}}, {{invert}}
# {{opposite}}, {{reciprocal}}
# {{additiveInverse}}, {{multiplicativeInverse}}

Looking at the classes implementing this interface in the core CM library, we find that
* {{Complex}}, {{Dfp}}, {{BigFraction}} and {{Fraction}} already have a {{negate()}} method.
* Besides, {{BigFraction}} and {{Fraction}} already have a {{reciprocal()}} method.

So the best naming option would seem to be (for the time being) a mixture of what Phil proposed. I realize it's not completely satisfactory because one is a noun and one a verb. However that's what would induce the least changes to the CM library. As a second step, it will be easier to change consistently the names of all classes implementing {{FieldElement}}.

So I propose to introduce {{negate()}} and {{reciprocal()}} in the {{FieldElement}} interface.

    
> Add methods negate() / reciprocal() to the FieldElement interface
> -----------------------------------------------------------------
>
>                 Key: MATH-686
>                 URL: https://issues.apache.org/jira/browse/MATH-686
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Sébastien Brisard
>            Priority: Trivial
>             Fix For: 3.0
>
>
> As discussed on the mailing list, it is proposed to add two methods to the {{FieldElement}} interface
> * {{negate()}} : returns the additive inverse of {{this}} element.
> * {{reciprocal()}} : returns the multiplicative inverse of {{this}} element.
> Several name couples have been proposed by Phil
> # {{negate}}, {{invert}}
> # {{opposite}}, {{reciprocal}}
> # {{additiveInverse}}, {{multiplicativeInverse}}
> Looking at the classes implementing this interface in the core CM library, we find that
> * {{Complex}}, {{Dfp}}, {{BigFraction}} and {{Fraction}} already have a {{negate()}} method.
> * Besides, {{BigFraction}} and {{Fraction}} already have a {{reciprocal()}} method.
> So the best naming option would seem to be (for the time being) a mixture of what Phil proposed. I realize it's not completely satisfactory because one is a noun and one a verb. Do we want to have good grammar, or preserve what's already implemented? I tend to favour the first option (consistently change the name of existing methods).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (MATH-686) Add methods negate() / reciprocal() to the FieldElement interface

Posted by "Sébastien Brisard (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13123371#comment-13123371 ] 

Sébastien Brisard commented on MATH-686:
----------------------------------------

As discussed on the mailing list, retained option was {{negate()}}/{{reciprocal{}}. This method were introduced in rev r1180312.
                
> Add methods negate() / reciprocal() to the FieldElement interface
> -----------------------------------------------------------------
>
>                 Key: MATH-686
>                 URL: https://issues.apache.org/jira/browse/MATH-686
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Sébastien Brisard
>            Priority: Trivial
>             Fix For: 3.0
>
>
> As discussed on the mailing list, it is proposed to add two methods to the {{FieldElement}} interface
> * {{negate()}} : returns the additive inverse of {{this}} element.
> * {{reciprocal()}} : returns the multiplicative inverse of {{this}} element.
> Several name couples have been proposed by Phil
> # {{negate}}, {{invert}}
> # {{opposite}}, {{reciprocal}}
> # {{additiveInverse}}, {{multiplicativeInverse}}
> Looking at the classes implementing this interface in the core CM library, we find that
> * {{Complex}}, {{Dfp}}, {{BigFraction}} and {{Fraction}} already have a {{negate()}} method.
> * Besides, {{BigFraction}} and {{Fraction}} already have a {{reciprocal()}} method.
> So the best naming option would seem to be (for the time being) a mixture of what Phil proposed. I realize it's not completely satisfactory because one is a noun and one a verb. Do we want to have good grammar, or preserve what's already implemented? I tend to favour the first option (consistently change the name of existing methods).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Resolved] (MATH-686) Add methods negate() / reciprocal() to the FieldElement interface

Posted by "Sébastien Brisard (Resolved JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MATH-686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sébastien Brisard resolved MATH-686.
------------------------------------

    Resolution: Fixed
    
> Add methods negate() / reciprocal() to the FieldElement interface
> -----------------------------------------------------------------
>
>                 Key: MATH-686
>                 URL: https://issues.apache.org/jira/browse/MATH-686
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Sébastien Brisard
>            Priority: Trivial
>             Fix For: 3.0
>
>
> As discussed on the mailing list, it is proposed to add two methods to the {{FieldElement}} interface
> * {{negate()}} : returns the additive inverse of {{this}} element.
> * {{reciprocal()}} : returns the multiplicative inverse of {{this}} element.
> Several name couples have been proposed by Phil
> # {{negate}}, {{invert}}
> # {{opposite}}, {{reciprocal}}
> # {{additiveInverse}}, {{multiplicativeInverse}}
> Looking at the classes implementing this interface in the core CM library, we find that
> * {{Complex}}, {{Dfp}}, {{BigFraction}} and {{Fraction}} already have a {{negate()}} method.
> * Besides, {{BigFraction}} and {{Fraction}} already have a {{reciprocal()}} method.
> So the best naming option would seem to be (for the time being) a mixture of what Phil proposed. I realize it's not completely satisfactory because one is a noun and one a verb. Do we want to have good grammar, or preserve what's already implemented? I tend to favour the first option (consistently change the name of existing methods).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira