commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arne Plöse (JIRA) <j...@apache.org>
Subject [jira] [Commented] (MATH-643) Rename RealVector.map* to RealVector.ebe* (mapAdd(...) to ebeAdd(...) and mapAddToSelf(...) to ebeAddToSelf(...) for instance
Date Mon, 08 Aug 2011 20:23:27 GMT

    [ https://issues.apache.org/jira/browse/MATH-643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13081167#comment-13081167
] 

Arne Plöse commented on MATH-643:
---------------------------------

@perl
http://perldoc.perl.org/functions/map.html
says that map evaluates a BLOCK or EXPR given to map. This is what RealVector.map(...) does
- nothing wrong with this.
But mapAdd(double d) is a simple addition of d to each element of the vector - I would say
name this mapping is wrong in this case.
{code}AbstractRealvector.mappAddToSelf(double d){code} uses internally mapping so this may
be OK - but I cant see any benefit from this.

I think the reason for ebe and map is only dotProduct|outherProduct|ebeMultiply to make clear
what the methods are doing.
By the way add(double[] v] should be renamend to ebeAdd(double[] v) to be consistent with
the naming scheme.

> Rename RealVector.map* to RealVector.ebe* (mapAdd(...) to ebeAdd(...) and mapAddToSelf(...)
to ebeAddToSelf(...) for instance
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MATH-643
>                 URL: https://issues.apache.org/jira/browse/MATH-643
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.0
>            Reporter: Arne Plöse
>            Priority: Minor
>
> I think the map* methods have historical names. Today I would prefer ebe as prefix like
ebeMultiply(...).
> This would describe the methods better from a users view.
> If this is a valid issue, I could provide a patch.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message