You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hama.apache.org by "Yexi Jiang (JIRA)" <ji...@apache.org> on 2013/06/20 14:36:20 UTC

[jira] [Comment Edited] (HAMA-765) Add apply method to Vector/Matrix

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

Yexi Jiang edited comment on HAMA-765 at 6/20/13 12:34 PM:
-----------------------------------------------------------

If this one is OK, is it OK to commit the changes?

The following is the test result:

mvn -Dtest=org.apache.hama.ml.\*.\* test

[INFO] Reactor Summary:
[INFO] 
[INFO] Apache Hama parent POM ............................ SUCCESS [1.165s]
[INFO] core .............................................. SUCCESS [3.795s]
[INFO] graph ............................................. SUCCESS [0.605s]
[INFO] machine learning .................................. SUCCESS [20.784s]
[INFO] examples .......................................... SUCCESS [0.379s]
[INFO] yarn .............................................. SUCCESS [1.694s]
[INFO] hama-dist ......................................... SUCCESS [0.009s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
                
      was (Author: yxjiang):
    If this one is OK, is it OK to commit the changes?

The following is the test result:

mvn -Dtest=org.apache.hama.ml.*.* test

[INFO] Reactor Summary:
[INFO] 
[INFO] Apache Hama parent POM ............................ SUCCESS [1.165s]
[INFO] core .............................................. SUCCESS [3.795s]
[INFO] graph ............................................. SUCCESS [0.605s]
[INFO] machine learning .................................. SUCCESS [20.784s]
[INFO] examples .......................................... SUCCESS [0.379s]
[INFO] yarn .............................................. SUCCESS [1.694s]
[INFO] hama-dist ......................................... SUCCESS [0.009s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
                  
> Add apply method to Vector/Matrix
> ---------------------------------
>
>                 Key: HAMA-765
>                 URL: https://issues.apache.org/jira/browse/HAMA-765
>             Project: Hama
>          Issue Type: Improvement
>            Reporter: Yexi Jiang
>            Assignee: Yexi Jiang
>            Priority: Minor
>         Attachments: HAMA-765.patch, HAMA-765.patch
>
>
> Add 'apply' method to Vector/Matrix to allow ad-hoc function apply to the elements of a Vector/Matrix.
> For example, if a function f( x ) needs to apply to the elements of a vector v, then we can use
> ------------
> DoubleFunction fun = new DoubleFunction() {
>   public double apply(double element) {
>     //  do what ever
>   }
> };
> v.apply(fun);
> ------------
> This method borrows the style of functional programming by allowing a function to apply to all the elements of a Vector/Matrix. It can simply the coding, especially for those algorithms where Vector/Matrix operations are heavily used.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira