summaryrefslogtreecommitdiff
path: root/js/Threshold
diff options
context:
space:
mode:
Diffstat (limited to 'js/Threshold')
-rw-r--r--js/Threshold/GENERAL_f.js13
-rw-r--r--js/Threshold/GENERAL_f.pickle18
-rw-r--r--js/Threshold/NEGTOPOS_f.js4
-rw-r--r--js/Threshold/NEGTOPOS_f.pickle10
-rw-r--r--js/Threshold/POSTONEG_f.js4
-rw-r--r--js/Threshold/POSTONEG_f.pickle10
-rw-r--r--js/Threshold/ZCROSS_f.js13
-rw-r--r--js/Threshold/ZCROSS_f.pickle14
8 files changed, 54 insertions, 32 deletions
diff --git a/js/Threshold/GENERAL_f.js b/js/Threshold/GENERAL_f.js
index 8079bbc7..210e3760 100644
--- a/js/Threshold/GENERAL_f.js
+++ b/js/Threshold/GENERAL_f.js
@@ -13,9 +13,9 @@ function GENERAL_f() {
this.model.blocktype = new ScilabString(["z"]);
this.model.firing = new ScilabDouble([-ones(this.out,1)]);
this.model.dep_ut = new ScilabDouble([true,false]);
- var exprs = [[strcat(sci2exp(this.in1))],[strcat(sci2exp(this.out))]];
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GENERAL_f\",sz(1),sz(2));"]);
- this.x = standard_define([3,2],this.model,exprs,gr_i);
+ this.exprs = [[strcat(sci2exp(this.in1))],[strcat(sci2exp(this.out))]];
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"GENERAL_f\",sz(1),sz(2));"]);
+ this.x = standard_define([3,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
GENERAL_f.prototype.details = function GENERAL_f() {
@@ -31,16 +31,17 @@ function GENERAL_f() {
GENERAL_f.prototype.set = function GENERAL_f() {
this.in1 = parseFloat(arguments[0]["in1"])
this.out = parseFloat(arguments[0]["out"])
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
var rpar = this.model.rpar;
this.in1 = this.model.in1;
this.out = this.model.evtout;
var nin = sum(this.in1);
var 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);
+ [ok,this.in1,this.out,this.exprs] = scicos_getvalue("Set General Zero-Crossing parameters",["Input size","Number of event output"],list("vec",1,"vec",1),this.exprs);
if (ok) {
var tmpvar0 = check_io(this.model,this.graphics,this.in1,[],[],ones(this.out,1));
this.model = tmpvar0[0];
@@ -61,7 +62,7 @@ function GENERAL_f() {
this.model.nzcross = new ScilabDouble([this.in1]);
this.model.rpar = new ScilabDouble(rp.slice());
this.model.firing = new ScilabDouble([-ones(this.out,1)]);
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.x.graphics = this.graphics;
this.x.model = this.model;
}
diff --git a/js/Threshold/GENERAL_f.pickle b/js/Threshold/GENERAL_f.pickle
index 9b35bd87..6b56ff54 100644
--- a/js/Threshold/GENERAL_f.pickle
+++ b/js/Threshold/GENERAL_f.pickle
@@ -2,18 +2,22 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'in1'
p2
-aS'model'
+aS'exprs'
p3
-aS'out'
+aS'gr_i'
p4
-aS'in1'
-p5
aS'graphics'
+p5
+aS'x'
p6
-atp7
-Rp8
+aS'model'
+p7
+aS'out'
+p8
+atp9
+Rp10
.(dp0
S'arg1'
p1
diff --git a/js/Threshold/NEGTOPOS_f.js b/js/Threshold/NEGTOPOS_f.js
index 81414ce2..9079f107 100644
--- a/js/Threshold/NEGTOPOS_f.js
+++ b/js/Threshold/NEGTOPOS_f.js
@@ -10,8 +10,8 @@ function NEGTOPOS_f() {
this.model.blocktype = new ScilabString(["z"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = new ScilabDouble([true,false]);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"NEGTOPOS_f\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model,[],gr_i);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"NEGTOPOS_f\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model,[],this.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 0116d67f..c9626baf 100644
--- a/js/Threshold/NEGTOPOS_f.pickle
+++ b/js/Threshold/NEGTOPOS_f.pickle
@@ -6,8 +6,14 @@ S'x'
p2
aS'model'
p3
-atp4
-Rp5
+aS'gr_i'
+p4
+aS'exprs'
+p5
+aS'graphics'
+p6
+atp7
+Rp8
.(dp0
S'model.sim'
p1
diff --git a/js/Threshold/POSTONEG_f.js b/js/Threshold/POSTONEG_f.js
index a6981a8c..db0e654e 100644
--- a/js/Threshold/POSTONEG_f.js
+++ b/js/Threshold/POSTONEG_f.js
@@ -11,8 +11,8 @@ function POSTONEG_f() {
this.model.blocktype = new ScilabString(["z"]);
this.model.dep_ut = new ScilabDouble([true,false]);
this.model.firing = new ScilabDouble([-1]);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"POSTONEG_f\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model,[],gr_i);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"POSTONEG_f\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model,[],this.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 2560cc83..6e98a2b8 100644
--- a/js/Threshold/POSTONEG_f.pickle
+++ b/js/Threshold/POSTONEG_f.pickle
@@ -6,8 +6,14 @@ S'x'
p2
aS'model'
p3
-atp4
-Rp5
+aS'gr_i'
+p4
+aS'exprs'
+p5
+aS'graphics'
+p6
+atp7
+Rp8
.(dp0
S'model.sim'
p1
diff --git a/js/Threshold/ZCROSS_f.js b/js/Threshold/ZCROSS_f.js
index e96ef207..288e89e9 100644
--- a/js/Threshold/ZCROSS_f.js
+++ b/js/Threshold/ZCROSS_f.js
@@ -12,9 +12,9 @@ function ZCROSS_f() {
this.model.blocktype = new ScilabString(["z"]);
this.model.firing = new ScilabDouble([-1]);
this.model.dep_ut = new ScilabDouble([true,false]);
- var exprs = strcat(sci2exp(this.in1));
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"ZCROSS_f\",sz(1),sz(2));"]);
- this.x = standard_define([2,2],this.model,exprs,gr_i);
+ this.exprs = strcat(sci2exp(this.in1));
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"ZCROSS_f\",sz(1),sz(2));"]);
+ this.x = standard_define([2,2],this.model,this.exprs,this.gr_i);
return new BasicBlock(this.x);
}
ZCROSS_f.prototype.details = function ZCROSS_f() {
@@ -27,12 +27,13 @@ function ZCROSS_f() {
}
ZCROSS_f.prototype.set = function ZCROSS_f() {
this.in1 = parseFloat(arguments[0]["in1"])
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
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);
+ [ok,this.in1,this.exprs] = scicos_getvalue([["Set Zero-Crossing parameters"],["All surfaces must cross together"]],"Input size",list("vec",1),this.exprs);
if (!ok) {
break;
}
@@ -45,7 +46,7 @@ function ZCROSS_f() {
var kk = kk+2^(this.in1+jj-1);
}
this.model.rpar = new ScilabDouble([-ones(kk,1)],[zeros(2^(2*this.in1)-kk,1)]);
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.model.in1 = new ScilabDouble([this.in1]);
this.model.nzcross = new ScilabDouble([this.in1]);
this.model.firing = new ScilabDouble([-1]);
diff --git a/js/Threshold/ZCROSS_f.pickle b/js/Threshold/ZCROSS_f.pickle
index ece29a05..95285053 100644
--- a/js/Threshold/ZCROSS_f.pickle
+++ b/js/Threshold/ZCROSS_f.pickle
@@ -2,16 +2,20 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'in1'
p2
-aS'model'
+aS'exprs'
p3
-aS'in1'
+aS'gr_i'
p4
aS'graphics'
p5
-atp6
-Rp7
+aS'x'
+p6
+aS'model'
+p7
+atp8
+Rp9
.(dp0
S'arg1'
p1