code: public void updateRow(int i, VectorFunction function) {
          VectorIterator it = iteratorOfRow(i);
  
          while (it.hasNext()) {
              double x = it.next();
              int j = it.index();
              it.set(function.evaluate(j, x));
          }
      }
docs: Updates all elements of the specified row in this matrix by applying given {@code function}.
  
  @param i the row index
  @param function the vector function