new file: resources/bytecode/javFiles/Scalar.jav
This commit is contained in:
parent
42821f3215
commit
c73e57cf2b
17
resources/bytecode/javFiles/Scalar.jav
Normal file
17
resources/bytecode/javFiles/Scalar.jav
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
//import java.util.Vector;
|
||||||
|
import java.lang.Integer;
|
||||||
|
import java.lang.Float;
|
||||||
|
//import java.lang.Byte;
|
||||||
|
//import java.lang.Boolean;
|
||||||
|
|
||||||
|
public class Scalar extends Vector<Integer> {
|
||||||
|
|
||||||
|
mul(v) {
|
||||||
|
var ret = 0;
|
||||||
|
var i = 0;
|
||||||
|
while(i < size()) {
|
||||||
|
ret = ret + this.elementAt(i) * v.elementAt(i);
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user