text: shadow$provide.module$node_modules$mathjs$lib$cjs$type$matrix$utils$algorithm06=function(global,require,module,exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.createAlgorithm06=void 0;global=require("module$node_modules$mathjs$lib$cjs$utils$factory");var _DimensionError=require("module$node_modules$mathjs$lib$cjs$error$DimensionError"),_collection=require("module$node_modules$mathjs$lib$cjs$utils$collection");require=(0,global.factory)("algorithm06",["typed","equalScalar"],
  function(_ref){var typed=_ref.typed,equalScalar=_ref.equalScalar;return function(a,b,callback){var avalues=a._values,asize=a._size,adt=a._datatype,bvalues=b._values,bsize=b._size,bdt=b._datatype;if(asize.length!==bsize.length)throw new _DimensionError.DimensionError(asize.length,bsize.length);if(asize[0]!==bsize[0]||asize[1]!==bsize[1])throw new RangeError("Dimension mismatch. Matrix A ("+asize+") must match Matrix B ("+bsize+")");bsize=asize[0];asize=asize[1];var eq=equalScalar,zero=0,cf=callback;
  if("string"===typeof adt&&adt===bdt){var dt=adt;eq=typed.find(equalScalar,[dt,dt]);zero=typed.convert(0,dt);cf=typed.find(callback,[dt,dt])}callback=avalues&&bvalues?[]:void 0;avalues=[];adt=[];bvalues=callback?[]:void 0;bdt=[];for(var u=[],j=0;j<asize;j++){adt[j]=avalues.length;var mark=j+1;(0,_collection.scatter)(a,j,bdt,bvalues,u,mark,avalues,cf);(0,_collection.scatter)(b,j,bdt,bvalues,u,mark,avalues,cf);if(bvalues)for(var k=adt[j];k<avalues.length;){var i=avalues[k];u[i]===mark?(i=bvalues[i],
  eq(i,zero)?avalues.splice(k,1):(callback.push(i),k++)):avalues.splice(k,1)}else for(k=adt[j];k<avalues.length;)u[avalues[k]]!==mark?avalues.splice(k,1):k++}adt[asize]=avalues.length;return a.createSparseMatrix({values:callback,index:avalues,ptr:adt,size:[bsize,asize],datatype:dt})}});exports.createAlgorithm06=require}
  //# sourceMappingURL=module$node_modules$mathjs$lib$cjs$type$matrix$utils$algorithm06.js.map
  