function _map(matrix, minRow, maxRow, minColumn, maxColumn, callback, skipZeros) {
    // result arrays
    var values = [];
    var index = [];
    var ptr = []; // equal signature to use

    var eq = equalScalar; // zero value

    var zero = 0;

    if (isString(matrix._datatype)) {
      // find signature that matches (datatype, datatype)
      eq = typed.find(equalScalar, [matrix._datatype, matrix._datatype]) || equalScalar; // convert 0 to the same datatype

      zero = typed.convert(0, matrix._datatype);
    } // invoke callback


    var invoke = function invoke(v, x, y) {
      // invoke callback
      v = callback(v, x, y); // check value != 0

      if (!eq(v, zero)) {
        // store value
        values.push(v); // index

        index.push(x);
      }
    }; // loop columns


    for (var j = minColumn; j <= maxColumn; j++) {
      // store pointer to values index
      ptr.push(values.length); // k0 <= k < k1 where k0 = _ptr[j] && k1 = _ptr[j+1]

      var k0 = matrix._ptr[j];
      var k1 = matrix._ptr[j + 1];

      if (skipZeros) {
        // loop k within [k0, k1[
        for (var k = k0; k < k1; k++) {
          // row index
          var i = matrix._index[k]; // check i is in range

          if (i >= minRow && i <= maxRow) {
            // value @ k
            invoke(matrix._values[k], i - minRow, j - minColumn);
          }
        }
      } else {
        // create a cache holding all defined values
        var _values = {};

        for (var _k = k0; _k < k1; _k++) {
          var _i4 = matrix._index[_k];
          _values[_i4] = matrix._values[_k];
        } // loop over all rows (indexes can be unordered so we can't use that),
        // and either read the value or zero


        for (var _i5 = minRow; _i5 <= maxRow; _i5++) {
          var value = _i5 in _values ? _values[_i5] : 0;
          invoke(value, _i5 - minRow, j - minColumn);
        }
      }
    } // store number of values in ptr


    ptr.push(values.length); // return sparse matrix

    return new SparseMatrix({
      values: values,
      index: index,
      ptr: ptr,
      size: [maxRow - minRow + 1, maxColumn - minColumn + 1]
    });
  }
Create a new matrix with the results of the callback function executed on the interval
[minRow..maxRow, minColumn..maxColumn].