Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-685

Add method "addToEntry" to the "RealVector" interface

    Details

    • Type: Wish
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0
    • Labels:

      Description

      Method "addToEntry":

      m.addToEntry(i, j, addend);
      

      as a shortcut to:

      m.setEntry(i, j, m.getEntry(i, j) + addend);
      

      It has been argued (on the "dev" ML) that some functional style would be a powerful and elegant way to implement a whole set of related functionality ("scale", "scaleAndAdd", etc.). However some simple things (like when the "addend" depends on "i" and "j") cannot be achieved without writing many more lines of code.

      Method "addToEntry" exists in "RealMatrix". If and when some satisfactory solution is found in order to remove it there, "RealVector" can always be aligned with it.

        Attachments

          Activity

            People

            • Assignee:
              erans Gilles
              Reporter:
              erans Gilles
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: