JavaCompilerCore/examples/bajo1/Matrix.jav

26 lines
457 B
Java
Executable File

class Matrix extends Menge<Menge<Integer>> {
mul(m){
ret = new Matrix();
i = 0;
while(i <size()) {
v1 = this.elementAt(i);
v2 = new Menge<Integer>();
j = 0;
while(j < v1.size()) {
erg = 0;
k = 0;
while(k < v1.size()) {
erg = erg + v1.elementAt(k).intValue() * m.elmentAt(k).elementAt(j).intValue();
k++;
}
v2.addElement(new Integer(erg);
j++;
}
ret.addElement(v2);
i++;
}
return ret;
}
}