1 | |
---|
2 | /*************************************************************************** |
---|
3 | module classe Biocell.h - description |
---|
4 | ***************************************************************************/ |
---|
5 | forward (YREAL x1, YREAL x2, YREAL x3, YREAL x4, YREAL x5, YREAL x6, YREAL x7, YREAL x8, |
---|
6 | YREAL sigma, YREAL seuil, YREAL mask) |
---|
7 | { |
---|
8 | double sum=0.0; |
---|
9 | for(int w=0; w<YNBI_Biocell-3; ++w) sum += Yting[w]; |
---|
10 | |
---|
11 | //cas standard discret |
---|
12 | //if (sum==2.0) YS1=1.0; else YS1=0.0; |
---|
13 | |
---|
14 | //formulation continue |
---|
15 | YS1 = exp(-0.5 * pow((sum-seuil),2) / pow(sigma,2)); |
---|
16 | |
---|
17 | //mask |
---|
18 | YS1 = YS1 * mask; |
---|
19 | } |
---|
20 | |
---|
21 | //=========================================================================== |
---|
22 | backward (YREAL x1, YREAL x2, YREAL x3, YREAL x4, YREAL x5, YREAL x6, YREAL x7, YREAL x8, |
---|
23 | YREAL sigma, YREAL seuil, YREAL mask) |
---|
24 | { |
---|
25 | double sum=0.0, expoSum; |
---|
26 | |
---|
27 | for(int w=0; w<YNBI_Biocell-3; w++) sum += Yting[w]; |
---|
28 | |
---|
29 | expoSum= exp(-0.5 * pow((sum-seuil),2) / pow(sigma,2)); |
---|
30 | |
---|
31 | YJ1I1 = -(sum-seuil)* expoSum/pow(sigma,2) * mask ; |
---|
32 | YJ1I2 = YJ1I3=YJ1I4=YJ1I5=YJ1I6=YJ1I7=YJ1I8= YJ1I1 * mask ; |
---|
33 | YJ1I9 = expoSum*(pow((sum-seuil),2)/pow(sigma,3)) * mask ; |
---|
34 | YJ1I10 = (sum-seuil)/pow(sigma,2) * expoSum * mask ; |
---|
35 | |
---|
36 | YJ1I11 = expoSum; |
---|
37 | } |
---|
38 | //************************** FIN DU MODULE Biocell **************************** |
---|
39 | |
---|
40 | |
---|
41 | |
---|
42 | |
---|
43 | |
---|
44 | |
---|
45 | |
---|
46 | |
---|