summaryrefslogtreecommitdiff
path: root/js/Threshold
diff options
context:
space:
mode:
Diffstat (limited to 'js/Threshold')
-rw-r--r--js/Threshold/GENERAL_f.js10
-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.js10
-rw-r--r--js/Threshold/ZCROSS_f.pickle14
8 files changed, 32 insertions, 48 deletions
diff --git a/js/Threshold/GENERAL_f.js b/js/Threshold/GENERAL_f.js
index 3c897775..40d34677 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 ScilabBoolean([true,false]);
- 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 = new standard_define(new ScilabDouble([3,2]),this.model,new ScilabDouble(this.exprs),this.gr_i);
+ 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 = new standard_define(new ScilabDouble([3,2]),this.model,new ScilabDouble(exprs),gr_i);
return new BasicBlock(this.x);
}
GENERAL_f.prototype.details = function GENERAL_f() {
@@ -29,7 +29,7 @@ function GENERAL_f() {
return options;
}
GENERAL_f.prototype.set = function GENERAL_f() {
- this.exprs = this.graphics.exprs;
+ var exprs = this.graphics.exprs;
var rpar = this.model.rpar;
this.in1 = this.model.in;
this.out = this.model.evtout;
@@ -58,7 +58,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([this.exprs]);
+ this.graphics.exprs = new ScilabDouble([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 678deb91..c3da51fb 100644
--- a/js/Threshold/GENERAL_f.pickle
+++ b/js/Threshold/GENERAL_f.pickle
@@ -2,22 +2,18 @@ c__builtin__
set
p0
((lp1
-S'in1'
+S'x'
p2
-aS'exprs'
+aS'model'
p3
-aS'gr_i'
+aS'out'
p4
-aS'graphics'
+aS'in1'
p5
-aS'x'
+aS'graphics'
p6
-aS'model'
-p7
-aS'out'
-p8
-atp9
-Rp10
+atp7
+Rp8
.(dp0
S'arg1'
p1
diff --git a/js/Threshold/NEGTOPOS_f.js b/js/Threshold/NEGTOPOS_f.js
index f3cb904c..aa053226 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 ScilabBoolean([true,false]);
- this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"NEGTOPOS_f\",sz(1),sz(2));"]);
- this.x = new standard_define(new ScilabDouble([2,2]),this.model,new ScilabDouble([]),this.gr_i);
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"NEGTOPOS_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2,2]),this.model,new ScilabDouble([]),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 9ec9e406..07bc1448 100644
--- a/js/Threshold/NEGTOPOS_f.pickle
+++ b/js/Threshold/NEGTOPOS_f.pickle
@@ -6,14 +6,10 @@ S'x'
p2
aS'model'
p3
-aS'gr_i'
-p4
-aS'exprs'
-p5
aS'graphics'
-p6
-atp7
-Rp8
+p4
+atp5
+Rp6
.(dp0
S'model.sim'
p1
diff --git a/js/Threshold/POSTONEG_f.js b/js/Threshold/POSTONEG_f.js
index dcef5065..7847c1a1 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 ScilabBoolean([true,false]);
this.model.firing = new ScilabDouble([-1]);
- this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"POSTONEG_f\",sz(1),sz(2));"]);
- this.x = new standard_define(new ScilabDouble([2,2]),this.model,new ScilabDouble([]),this.gr_i);
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"POSTONEG_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2,2]),this.model,new ScilabDouble([]),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 47d2f4e3..6a2bd6de 100644
--- a/js/Threshold/POSTONEG_f.pickle
+++ b/js/Threshold/POSTONEG_f.pickle
@@ -6,14 +6,10 @@ S'x'
p2
aS'model'
p3
-aS'gr_i'
-p4
-aS'exprs'
-p5
aS'graphics'
-p6
-atp7
-Rp8
+p4
+atp5
+Rp6
.(dp0
S'model.sim'
p1
diff --git a/js/Threshold/ZCROSS_f.js b/js/Threshold/ZCROSS_f.js
index 4e5b1346..28cddce5 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 ScilabBoolean([true,false]);
- this.exprs = strcat(sci2exp(this.in1));
- this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"ZCROSS_f\",sz(1),sz(2));"]);
- this.x = new standard_define(new ScilabDouble([2,2]),this.model,new ScilabDouble([this.exprs]),this.gr_i);
+ var exprs = strcat(sci2exp(this.in1));
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"ZCROSS_f\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([2,2]),this.model,new ScilabDouble([exprs]),gr_i);
return new BasicBlock(this.x);
}
ZCROSS_f.prototype.details = function ZCROSS_f() {
@@ -27,7 +27,7 @@ function ZCROSS_f() {
return options;
}
ZCROSS_f.prototype.set = function ZCROSS_f() {
- this.exprs = this.graphics.exprs;
+ var exprs = this.graphics.exprs;
while (true) {
var ok = true;
this.in1 = parseFloat(arguments[0]["in1"]);
@@ -44,7 +44,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([this.exprs]);
+ this.graphics.exprs = new ScilabDouble([exprs]);
this.model.in = 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 30afed6c..227100b0 100644
--- a/js/Threshold/ZCROSS_f.pickle
+++ b/js/Threshold/ZCROSS_f.pickle
@@ -2,20 +2,16 @@ c__builtin__
set
p0
((lp1
-S'in1'
+S'x'
p2
-aS'exprs'
+aS'model'
p3
-aS'gr_i'
+aS'in1'
p4
aS'graphics'
p5
-aS'x'
-p6
-aS'model'
-p7
-atp8
-Rp9
+atp6
+Rp7
.(dp0
S'arg1'
p1