Yexi Jiang created HAMA-765:
-------------------------------

             Summary: Add apply method to Vector/Matrix
                 Key: HAMA-765
                 URL: https://issues.apache.org/jira/browse/HAMA-765
             Project: Hama
          Issue Type: Improvement
         Environment: 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.
            Reporter: Yexi Jiang
            Assignee: Yexi Jiang
            Priority: Minor




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

Reply via email to