diff options
author | Sunil Shetye | 2018-07-09 11:43:39 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-07-09 12:16:25 +0530 |
commit | 62b1d7dd9183ed75733b44104890586b03818214 (patch) | |
tree | 9859e9ca295df98df945bd5fcccc3a264e8bede1 /js/Linear/BIGSOM_f.js | |
parent | 5c011853630a1b466ef4789d5b600dd530d0a3ec (diff) | |
download | sci2js-62b1d7dd9183ed75733b44104890586b03818214.tar.gz sci2js-62b1d7dd9183ed75733b44104890586b03818214.tar.bz2 sci2js-62b1d7dd9183ed75733b44104890586b03818214.zip |
support ScilabBoolean, ScilabDouble, ScilabString
Diffstat (limited to 'js/Linear/BIGSOM_f.js')
-rw-r--r-- | js/Linear/BIGSOM_f.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/js/Linear/BIGSOM_f.js b/js/Linear/BIGSOM_f.js index e3a3d172..c4c0daca 100644 --- a/js/Linear/BIGSOM_f.js +++ b/js/Linear/BIGSOM_f.js @@ -2,16 +2,16 @@ function BIGSOM_f() { BIGSOM_f.prototype.define = function BIGSOM_f() { this.sgn = [[1],[1]]; - model = scicos_model(); - model.sim = list("sum",2); - model.in1 = [[-1],[-1]]; - model.out = -1; - model.rpar = this.sgn; - model.blocktype = "c"; - model.dep_ut = [true,false]; + this.model = scicos_model(); + this.model.sim = list("sum",2); + this.model.in1 = [[-1],[-1]]; + this.model.out = new ScilabDouble(-1); + this.model.rpar = this.sgn; + this.model.blocktype = new ScilabString("c"); + this.model.dep_ut = [true,false]; exprs = sci2exp(this.sgn); gr_i = []; - this.x = standard_define([2,3],model,exprs,gr_i); + this.x = standard_define([2,3],this.model,exprs,gr_i); return new BigSom(this.x); } BIGSOM_f.prototype.details = function BIGSOM_f() { @@ -26,7 +26,7 @@ function BIGSOM_f() { this.sgn = inverse(arguments[0]["sgn"]) this.x = arg1; graphics = arg1.graphics; - model = arg1.model; + this.model = arg1.model; exprs = graphics.exprs; while (true) { [ok,this.sgn,exprs] = scicos_getvalue("Set sum block parameters","Inputs ports signs/gain",list("vec",-1),exprs); @@ -34,12 +34,12 @@ function BIGSOM_f() { break; } in1 = -ones(size(this.sgn,"*"),1); - [model,graphics,ok] = check_io(model,graphics,in1,-1,[],[]); + [model,graphics,ok] = check_io(this.model,graphics,in1,-1,[],[]); if (ok) { - model.rpar = this.sgn.slice(); + this.model.rpar = this.sgn.slice(); graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } |