diff options
Diffstat (limited to 'js/Threshold')
-rw-r--r-- | js/Threshold/GENERAL_f.js | 38 | ||||
-rw-r--r-- | js/Threshold/GENERAL_f.pickle | 10 | ||||
-rw-r--r-- | js/Threshold/NEGTOPOS_f.js | 20 | ||||
-rw-r--r-- | js/Threshold/NEGTOPOS_f.pickle | 6 | ||||
-rw-r--r-- | js/Threshold/POSTONEG_f.js | 20 | ||||
-rw-r--r-- | js/Threshold/POSTONEG_f.pickle | 6 | ||||
-rw-r--r-- | js/Threshold/ZCROSS_f.js | 32 | ||||
-rw-r--r-- | js/Threshold/ZCROSS_f.pickle | 8 |
8 files changed, 74 insertions, 66 deletions
diff --git a/js/Threshold/GENERAL_f.js b/js/Threshold/GENERAL_f.js index adc77cb3..cc6e31c3 100644 --- a/js/Threshold/GENERAL_f.js +++ b/js/Threshold/GENERAL_f.js @@ -4,18 +4,18 @@ function GENERAL_f() { rpar = [[0],[0],[0],[0]]; this.in1 = 1; this.out = 1; - model = scicos_model(); - model.sim = list("zcross",1); - model.nzcross = this.in1; - model.in1 = this.in1; - model.evtout = ones(this.out,1); - model.rpar = [[0],[0],[0],[0]]; - model.blocktype = "z"; - model.firing = -ones(this.out,1); - model.dep_ut = [true,false]; + this.model = scicos_model(); + this.model.sim = list("zcross",1); + this.model.nzcross = new ScilabDouble(this.in1); + this.model.in1 = new ScilabDouble(this.in1); + this.model.evtout = new ScilabDouble(ones(this.out,1)); + this.model.rpar = [[0],[0],[0],[0]]; + this.model.blocktype = new ScilabString("z"); + this.model.firing = new ScilabDouble(-ones(this.out,1)); + this.model.dep_ut = [true,false]; exprs = [[strcat(sci2exp(this.in1))],[strcat(sci2exp(this.out))]]; gr_i = []; - this.x = standard_define([3,2],model,exprs,gr_i); + this.x = standard_define([3,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } GENERAL_f.prototype.details = function GENERAL_f() { @@ -34,15 +34,15 @@ function GENERAL_f() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; - rpar = model.rpar; - this.in1 = model.in1; - this.out = model.evtout; + this.model = arg1.model; + rpar = this.model.rpar; + this.in1 = this.model.in1; + this.out = this.model.evtout; nin = sum(this.in1); nout = sum(this.out); [ok,this.in1,this.out,exprs] = scicos_getvalue("Set General Zero-Crossing parameters",["Input size","Number of event output"],list("vec",1,"vec",1),exprs); if (ok) { - [model,graphics,ok] = check_io(model,graphics,this.in1,[],[],ones(this.out,1)); + [model,graphics,ok] = check_io(this.model,graphics,this.in1,[],[],ones(this.out,1)); if (ok) { nout1 = this.out; nin1 = this.in1; @@ -55,12 +55,12 @@ function GENERAL_f() { result = x_mdialog("routing matrix",string(1,nout1),string(1,2^(2*nin1)),string(rp.slice().slice())); if (result!=[]) { rp.slice(1-1,nout1).slice(1-1,2*n) = evstr(result); - model.nzcross = this.in1; - model.rpar = rp.slice(); - model.firing = -ones(this.out,1); + this.model.nzcross = new ScilabDouble(this.in1); + this.model.rpar = rp.slice(); + this.model.firing = new ScilabDouble(-ones(this.out,1)); graphics.exprs = exprs; this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; } } } diff --git a/js/Threshold/GENERAL_f.pickle b/js/Threshold/GENERAL_f.pickle index 6ca65ee0..19047dfc 100644 --- a/js/Threshold/GENERAL_f.pickle +++ b/js/Threshold/GENERAL_f.pickle @@ -4,12 +4,14 @@ p0 ((lp1 S'x' p2 -aS'in1' +aS'model' p3 -aS'out' +aS'in1' p4 -atp5 -Rp6 +aS'out' +p5 +atp6 +Rp7 .(dp0 S'arg1' p1 diff --git a/js/Threshold/NEGTOPOS_f.js b/js/Threshold/NEGTOPOS_f.js index d23001d0..81862e86 100644 --- a/js/Threshold/NEGTOPOS_f.js +++ b/js/Threshold/NEGTOPOS_f.js @@ -1,17 +1,17 @@ /* autogenerated from "macros/Threshold/NEGTOPOS_f.sci" */ function NEGTOPOS_f() { NEGTOPOS_f.prototype.define = function NEGTOPOS_f() { - model = scicos_model(); - model.sim = list("zcross",1); - model.nzcross = 1; - model.in1 = 1; - model.evtout = 1; - model.rpar = [[-1],[-1],[0],[-1]]; - model.blocktype = "z"; - model.firing = -1; - model.dep_ut = [true,false]; + this.model = scicos_model(); + this.model.sim = list("zcross",1); + this.model.nzcross = new ScilabDouble(1); + this.model.in1 = new ScilabDouble(1); + this.model.evtout = new ScilabDouble(1); + this.model.rpar = [[-1],[-1],[0],[-1]]; + this.model.blocktype = new ScilabString("z"); + this.model.firing = new ScilabDouble(-1); + this.model.dep_ut = [true,false]; gr_i = []; - this.x = standard_define([2,2],model,[],gr_i); + this.x = standard_define([2,2],this.model,[],gr_i); return new BasicBlock(this.x); } NEGTOPOS_f.prototype.details = function NEGTOPOS_f() { diff --git a/js/Threshold/NEGTOPOS_f.pickle b/js/Threshold/NEGTOPOS_f.pickle index dc317b49..6955283d 100644 --- a/js/Threshold/NEGTOPOS_f.pickle +++ b/js/Threshold/NEGTOPOS_f.pickle @@ -4,8 +4,10 @@ p0 ((lp1 S'x' p2 -atp3 -Rp4 +aS'model' +p3 +atp4 +Rp5 .(dp0 S'model.sim' p1 diff --git a/js/Threshold/POSTONEG_f.js b/js/Threshold/POSTONEG_f.js index 24aae903..8913a995 100644 --- a/js/Threshold/POSTONEG_f.js +++ b/js/Threshold/POSTONEG_f.js @@ -2,17 +2,17 @@ function POSTONEG_f() { POSTONEG_f.prototype.define = function POSTONEG_f() { rpar = [[-1],[-1],[-1],[0]]; - model = scicos_model(); - model.sim = list("zcross",1); - model.nzcross = 1; - model.in1 = 1; - model.evtout = 1; - model.rpar = [[-1],[-1],[-1],[0]]; - model.blocktype = "z"; - model.dep_ut = [true,false]; - model.firing = [-1]; + this.model = scicos_model(); + this.model.sim = list("zcross",1); + this.model.nzcross = new ScilabDouble(1); + this.model.in1 = new ScilabDouble(1); + this.model.evtout = new ScilabDouble(1); + this.model.rpar = [[-1],[-1],[-1],[0]]; + this.model.blocktype = new ScilabString("z"); + this.model.dep_ut = [true,false]; + this.model.firing = [-1]; gr_i = []; - this.x = standard_define([2,2],model,[],gr_i); + this.x = standard_define([2,2],this.model,[],gr_i); return new BasicBlock(this.x); } POSTONEG_f.prototype.details = function POSTONEG_f() { diff --git a/js/Threshold/POSTONEG_f.pickle b/js/Threshold/POSTONEG_f.pickle index 18fad599..2905c4eb 100644 --- a/js/Threshold/POSTONEG_f.pickle +++ b/js/Threshold/POSTONEG_f.pickle @@ -4,8 +4,10 @@ p0 ((lp1 S'x' p2 -atp3 -Rp4 +aS'model' +p3 +atp4 +Rp5 .(dp0 S'model.sim' p1 diff --git a/js/Threshold/ZCROSS_f.js b/js/Threshold/ZCROSS_f.js index fae6bbaf..606966d0 100644 --- a/js/Threshold/ZCROSS_f.js +++ b/js/Threshold/ZCROSS_f.js @@ -3,18 +3,18 @@ function ZCROSS_f() { ZCROSS_f.prototype.define = function ZCROSS_f() { rpar = [[-1],[-1],[0],[0]]; this.in1 = 1; - model = scicos_model(); - model.sim = list("zcross",1); - model.in1 = this.in1; - model.nzcross = this.in1; - model.evtout = 1; - model.rpar = [[-1],[-1],[0],[0]]; - model.blocktype = "z"; - model.firing = -1; - model.dep_ut = [true,false]; + this.model = scicos_model(); + this.model.sim = list("zcross",1); + this.model.in1 = new ScilabDouble(this.in1); + this.model.nzcross = new ScilabDouble(this.in1); + this.model.evtout = new ScilabDouble(1); + this.model.rpar = [[-1],[-1],[0],[0]]; + this.model.blocktype = new ScilabString("z"); + this.model.firing = new ScilabDouble(-1); + this.model.dep_ut = [true,false]; exprs = strcat(sci2exp(this.in1)); gr_i = []; - this.x = standard_define([2,2],model,exprs,gr_i); + this.x = standard_define([2,2],this.model,exprs,gr_i); return new BasicBlock(this.x); } ZCROSS_f.prototype.details = function ZCROSS_f() { @@ -30,7 +30,7 @@ function ZCROSS_f() { this.x = arg1; graphics = arg1.graphics; exprs = graphics.exprs; - model = arg1.model; + this.model = arg1.model; while (true) { [ok,this.in1,exprs] = scicos_getvalue([["Set Zero-Crossing parameters"],["All surfaces must cross together"]],"Input size",list("vec",1),exprs); if (!ok) { @@ -44,13 +44,13 @@ function ZCROSS_f() { for (jj=1;jj<=this.in1;jj+=1) { kk = kk+2^(this.in1+jj-1); } - model.rpar = [[-ones(kk,1)],[zeros(2^(2*this.in1)-kk,1)]]; + this.model.rpar = [[-ones(kk,1)],[zeros(2^(2*this.in1)-kk,1)]]; graphics.exprs = exprs; - model.in1 = this.in1; - model.nzcross = this.in1; - model.firing = -1; + this.model.in1 = new ScilabDouble(this.in1); + this.model.nzcross = new ScilabDouble(this.in1); + this.model.firing = new ScilabDouble(-1); this.x.graphics = graphics; - this.x.model = model; + this.x.model = this.model; break; } } diff --git a/js/Threshold/ZCROSS_f.pickle b/js/Threshold/ZCROSS_f.pickle index 49628617..a2c25b4d 100644 --- a/js/Threshold/ZCROSS_f.pickle +++ b/js/Threshold/ZCROSS_f.pickle @@ -4,10 +4,12 @@ p0 ((lp1 S'x' p2 -aS'in1' +aS'model' p3 -atp4 -Rp5 +aS'in1' +p4 +atp5 +Rp6 .(dp0 S'arg1' p1 |