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 2012/02/10 07:13:59 UTC

[jira] [Created] (MATH-743) Use enums in package transform

Use enums in package transform
------------------------------

                 Key: MATH-743
                 URL: https://issues.apache.org/jira/browse/MATH-743
             Project: Commons Math
          Issue Type: Improvement
    Affects Versions: 3.0
            Reporter: Sébastien Brisard
            Assignee: Sébastien Brisard


As discussed on the mailing-list, enums could be used in the package {{transform}}
# An enumeration {{FORWARD, INVERSE}} will be created to specify whether the inverse transform is to be computed. This will replace the pair {{transform}}/{{inverseTransform}}
# An enumeration {{STANDARD, ORTHOGONAL}} will be introduced (where relevant) in each transform class, in order to specify the normalization that should be used. Then the factory methods {{create()}}/{{createOrthogonal()}} will be replaced by a parameter passed to the constructor, which will be made public.

--
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-743) Use enums in package transform

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

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

In {{r1243110}}, introduced {{TransformType}} in {{RealTransformer}}.
                
> Use enums in package transform
> ------------------------------
>
>                 Key: MATH-743
>                 URL: https://issues.apache.org/jira/browse/MATH-743
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: api-change, enum, transform
>
> As discussed on the mailing-list, enums could be used in the package {{transform}}
> # An enumeration {{FORWARD, INVERSE}} will be created to specify whether the inverse transform is to be computed. This will replace the pair {{transform}}/{{inverseTransform}}
> # An enumeration {{STANDARD, ORTHOGONAL}} will be introduced (where relevant) in each transform class, in order to specify the normalization that should be used. Then the factory methods {{create()}}/{{createOrthogonal()}} will be replaced by a parameter passed to the constructor, which will be made public.

--
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-743) Use enums in package transform

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

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

In {{r1243263}}, introduced {{DctNormalization}} to specify the normalization of discrete cosine transforms (standard, orthogonal).
                
> Use enums in package transform
> ------------------------------
>
>                 Key: MATH-743
>                 URL: https://issues.apache.org/jira/browse/MATH-743
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: api-change, enum, transform
>
> As discussed on the mailing-list, enums could be used in the package {{transform}}
> # An enumeration {{FORWARD, INVERSE}} will be created to specify whether the inverse transform is to be computed. This will replace the pair {{transform}}/{{inverseTransform}}
> # An enumeration {{STANDARD, ORTHOGONAL}} will be introduced (where relevant) in each transform class, in order to specify the normalization that should be used. Then the factory methods {{create()}}/{{createOrthogonal()}} will be replaced by a parameter passed to the constructor, which will be made public.

--
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-743) Use enums in package transform

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

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

       Resolution: Fixed
    Fix Version/s: 3.0

All proposed API changes have been implemented.
                
> Use enums in package transform
> ------------------------------
>
>                 Key: MATH-743
>                 URL: https://issues.apache.org/jira/browse/MATH-743
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: api-change, enum, transform
>             Fix For: 3.0
>
>
> As discussed on the mailing-list, enums could be used in the package {{transform}}
> # An enumeration {{FORWARD, INVERSE}} will be created to specify whether the inverse transform is to be computed. This will replace the pair {{transform}}/{{inverseTransform}}
> # An enumeration {{STANDARD, ORTHOGONAL}} will be introduced (where relevant) in each transform class, in order to specify the normalization that should be used. Then the factory methods {{create()}}/{{createOrthogonal()}} will be replaced by a parameter passed to the constructor, which will be made public.

--
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-743) Use enums in package transform

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

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

Not sure I see how this is related to the changes discussed here, but by all means, give it a try. You might want to wait for a couple of days, though, as I still have a few API changes to do on package transform (mostly DCT and DST related).
Good luck with the optimization!
                
> Use enums in package transform
> ------------------------------
>
>                 Key: MATH-743
>                 URL: https://issues.apache.org/jira/browse/MATH-743
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: api-change, enum, transform
>
> As discussed on the mailing-list, enums could be used in the package {{transform}}
> # An enumeration {{FORWARD, INVERSE}} will be created to specify whether the inverse transform is to be computed. This will replace the pair {{transform}}/{{inverseTransform}}
> # An enumeration {{STANDARD, ORTHOGONAL}} will be introduced (where relevant) in each transform class, in order to specify the normalization that should be used. Then the factory methods {{create()}}/{{createOrthogonal()}} will be replaced by a parameter passed to the constructor, which will be made public.

--
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-743) Use enums in package transform

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

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


Fixed in 3.0.
                
> Use enums in package transform
> ------------------------------
>
>                 Key: MATH-743
>                 URL: https://issues.apache.org/jira/browse/MATH-743
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: api-change, enum, transform
>             Fix For: 3.0
>
>
> As discussed on the mailing-list, enums could be used in the package {{transform}}
> # An enumeration {{FORWARD, INVERSE}} will be created to specify whether the inverse transform is to be computed. This will replace the pair {{transform}}/{{inverseTransform}}
> # An enumeration {{STANDARD, ORTHOGONAL}} will be introduced (where relevant) in each transform class, in order to specify the normalization that should be used. Then the factory methods {{create()}}/{{createOrthogonal()}} will be replaced by a parameter passed to the constructor, which will be made public.

--
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-743) Use enums in package transform

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

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

In revision {{r1242703}}, introduced
* enumeration {{TransformType}}, with two values {{FORWARD}} and {{INVERSE}}
* enumeration {{FastFourierTransformer.DftNormalization}}, with two values {{STANDARD}} and {{UNITARY}}.

In {{FastFourierTransformer}}, the normalization is now specified at construction time, while the type is specified in the methods {{Complex[] transform(Complex[], TransformType)}} and the likes. The rationale is that no matter the transform (DFT, DST, DCT, DHT), forward and inverse are always meaningful (so {{TransformType}} is shared by *all* transforms). On the other hand, normalization is transform specific. For example, DST and DCT can be made orthogonal, while FFT can be made unitary (orthogonal doesn't mean anything with complex transforms).

This API change greatly simplifies unit testing, as it is now possible to *loop* over the types and normalizations!

In order to allow for possible independent implementations of the DFT, I propose that {{DftNormalization}} be a top-level enum, instead of a nested enum. Also, most of the header of the current Javadoc of {{FastFourierTransformer}} should actually move to {{DftNormalization}}.
                
> Use enums in package transform
> ------------------------------
>
>                 Key: MATH-743
>                 URL: https://issues.apache.org/jira/browse/MATH-743
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: api-change, enum, transform
>
> As discussed on the mailing-list, enums could be used in the package {{transform}}
> # An enumeration {{FORWARD, INVERSE}} will be created to specify whether the inverse transform is to be computed. This will replace the pair {{transform}}/{{inverseTransform}}
> # An enumeration {{STANDARD, ORTHOGONAL}} will be introduced (where relevant) in each transform class, in order to specify the normalization that should be used. Then the factory methods {{create()}}/{{createOrthogonal()}} will be replaced by a parameter passed to the constructor, which will be made public.

--
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-743) Use enums in package transform

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

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

In {{r1243595}}, introduced {{DstNormalization}} to specify the normalization of discrete sine transforms (standard, orthogonal).
                
> Use enums in package transform
> ------------------------------
>
>                 Key: MATH-743
>                 URL: https://issues.apache.org/jira/browse/MATH-743
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: api-change, enum, transform
>
> As discussed on the mailing-list, enums could be used in the package {{transform}}
> # An enumeration {{FORWARD, INVERSE}} will be created to specify whether the inverse transform is to be computed. This will replace the pair {{transform}}/{{inverseTransform}}
> # An enumeration {{STANDARD, ORTHOGONAL}} will be introduced (where relevant) in each transform class, in order to specify the normalization that should be used. Then the factory methods {{create()}}/{{createOrthogonal()}} will be replaced by a parameter passed to the constructor, which will be made public.

--
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-743) Use enums in package transform

Posted by "Leandro Ariel Pezzente (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MATH-743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13206320#comment-13206320 ] 

Leandro Ariel Pezzente commented on MATH-743:
---------------------------------------------

I would love to give it a try at changing the transformer loops into a recursive summation function just to see if it improves performance.
                
> Use enums in package transform
> ------------------------------
>
>                 Key: MATH-743
>                 URL: https://issues.apache.org/jira/browse/MATH-743
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: api-change, enum, transform
>
> As discussed on the mailing-list, enums could be used in the package {{transform}}
> # An enumeration {{FORWARD, INVERSE}} will be created to specify whether the inverse transform is to be computed. This will replace the pair {{transform}}/{{inverseTransform}}
> # An enumeration {{STANDARD, ORTHOGONAL}} will be introduced (where relevant) in each transform class, in order to specify the normalization that should be used. Then the factory methods {{create()}}/{{createOrthogonal()}} will be replaced by a parameter passed to the constructor, which will be made public.

--
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-743) Use enums in package transform

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

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

In {{r1243009}}, {{DftNormalization}} has been changed to a top-level enum.
                
> Use enums in package transform
> ------------------------------
>
>                 Key: MATH-743
>                 URL: https://issues.apache.org/jira/browse/MATH-743
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Sébastien Brisard
>            Assignee: Sébastien Brisard
>              Labels: api-change, enum, transform
>
> As discussed on the mailing-list, enums could be used in the package {{transform}}
> # An enumeration {{FORWARD, INVERSE}} will be created to specify whether the inverse transform is to be computed. This will replace the pair {{transform}}/{{inverseTransform}}
> # An enumeration {{STANDARD, ORTHOGONAL}} will be introduced (where relevant) in each transform class, in order to specify the normalization that should be used. Then the factory methods {{create()}}/{{createOrthogonal()}} will be replaced by a parameter passed to the constructor, which will be made public.

--
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