algorithm14 = function algorithm14(a, b, callback, inverse) {
    // a arrays
    var adata = a._data;
    var asize = a._size;
    var adt = a._datatype; // datatype

    var dt; // callback signature to use

    var cf = callback; // process data types

    if (typeof adt === 'string') {
      // datatype
      dt = adt; // convert b to the same datatype

      b = typed.convert(b, dt); // callback

      cf = typed.find(callback, [dt, dt]);
    } // populate cdata, iterate through dimensions


    var cdata = asize.length > 0 ? _iterate(cf, 0, asize, asize[0], adata, b, inverse) : []; // c matrix

    return new DenseMatrix({
      data: cdata,
      size: clone(asize),
      datatype: dt
    });
  }
Iterates over DenseMatrix items and invokes the callback function f(Aij..z, b).
Callback function invoked MxN times.

C(i,j,...z) = f(Aij..z, b)

@param {Matrix}   a                 The DenseMatrix instance (A)
@param {Scalar}   b                 The Scalar value
@param {Function} callback          The f(Aij..z,b) operation to invoke
@param {boolean}  inverse           A true value indicates callback should be invoked f(b,Aij..z)

@return {Matrix}                    DenseMatrix (C)

https://github.com/josdejong/mathjs/pull/346#issuecomment-97659042