forked from JavaTX/JavaCompilerCore
Merge branch 'bigRefactoring' into sat
This commit is contained in:
commit
bf4e65caf5
@ -3,24 +3,27 @@ import java.lang.Integer;
|
|||||||
import java.lang.Boolean;
|
import java.lang.Boolean;
|
||||||
|
|
||||||
class Matrix extends Vector<Vector<Integer>> {
|
class Matrix extends Vector<Vector<Integer>> {
|
||||||
|
Integer mul1(Integer x, Integer y) { return x;}
|
||||||
|
Integer add1(Integer x, Integer y) { return x;}
|
||||||
mul(m) {
|
mul(m) {
|
||||||
var ret = new Matrix();
|
var ret = new Matrix();
|
||||||
var i = 0;
|
var i = 0;
|
||||||
//while(i < size()) {
|
while(i < size()) {
|
||||||
var v1 = this.elementAt(i);
|
var v1 = this.elementAt(i);
|
||||||
//var v2 = new Vector<Integer>();
|
var v2 = new Vector<Integer>();
|
||||||
//var j = 0;
|
var j = 0;
|
||||||
//while(j < v1.size()) {
|
while(j < v1.size()) {
|
||||||
//var erg = 0;
|
var erg = 0;
|
||||||
//var k = 0;
|
var k = 0;
|
||||||
//while(k < v1.size()) {
|
while(k < v1.size()) {
|
||||||
//erg = erg + v1.elementAt(k)
|
//erg = erg + v1.elementAt(k) * m.elementAt(k).elementAt(j);
|
||||||
// * m.elementAt(k).elementAt(j);
|
erg = add1(erg, mul1(v1.elementAt(k),
|
||||||
//k++; }
|
m.elementAt(k).elementAt(j)));
|
||||||
//v2.addElement(new Integer(erg));
|
k++; }
|
||||||
//j++; }
|
v2.addElement(new Integer(erg));
|
||||||
//ret.addElement(v2);
|
j++; }
|
||||||
//i++; }
|
ret.addElement(v2);
|
||||||
|
i++; }
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user