From e44a7e37b6c7b5961adaffc62b9042b8d442938e Mon Sep 17 00:00:00 2001 From: mensonge Date: Thu, 13 Nov 2008 09:49:11 +0000 Subject: New feature: basic Ajax suggestion for tags and implementation of Dojo toolkit git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@151 b3834d28-1941-0410-a4f8-b48e95affb8f --- includes/js/dojox/math/matrix.js | 294 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 294 insertions(+) create mode 100644 includes/js/dojox/math/matrix.js (limited to 'includes/js/dojox/math/matrix.js') diff --git a/includes/js/dojox/math/matrix.js b/includes/js/dojox/math/matrix.js new file mode 100644 index 0000000..386bad3 --- /dev/null +++ b/includes/js/dojox/math/matrix.js @@ -0,0 +1,294 @@ +if(!dojo._hasResource["dojox.math.matrix"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. +dojo._hasResource["dojox.math.matrix"] = true; +dojo.provide("dojox.math.matrix"); + +dojo.mixin(dojox.math.matrix, { + iDF:0, + ALMOST_ZERO: 1e-10, + multiply: function(/* Array */a, /* Array */b){ + // summary + // Multiply matrix a by matrix b. + var ay=a.length, ax=a[0].length, by=b.length, bx=b[0].length; + if(ax!=by){ + console.warn("Can't multiply matricies of sizes " + ax + "," + ay + " and " + bx + "," + by); + return [[0]]; + } + var c=[]; + for (var k=0; k-1){ + b+="."; + } + while(b.length0?a[0].length:0; + var buffer=""; + for(var y=0; y