@decidables/detectable-elements 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/LICENSE.md +1112 -0
  3. package/README.md +1218 -0
  4. package/lib/detectableElements.esm.js +18385 -0
  5. package/lib/detectableElements.esm.js.map +1 -0
  6. package/lib/detectableElements.esm.min.js +13 -0
  7. package/lib/detectableElements.esm.min.js.map +1 -0
  8. package/lib/detectableElements.umd.js +18413 -0
  9. package/lib/detectableElements.umd.js.map +1 -0
  10. package/lib/detectableElements.umd.min.js +13 -0
  11. package/lib/detectableElements.umd.min.js.map +1 -0
  12. package/package.json +58 -0
  13. package/src/components/detectable-control.js +272 -0
  14. package/src/components/detectable-response.js +414 -0
  15. package/src/components/detectable-table.js +602 -0
  16. package/src/components/index.js +7 -0
  17. package/src/components/rdk-task.js +586 -0
  18. package/src/components/roc-space.js +1220 -0
  19. package/src/components/sdt-model.js +1835 -0
  20. package/src/detectable-element.js +121 -0
  21. package/src/equations/dc2far.js +182 -0
  22. package/src/equations/dc2hr.js +191 -0
  23. package/src/equations/facr2far.js +120 -0
  24. package/src/equations/hm2hr.js +121 -0
  25. package/src/equations/hmfacr2acc.js +161 -0
  26. package/src/equations/hrfar2c.js +179 -0
  27. package/src/equations/hrfar2d.js +162 -0
  28. package/src/equations/index.js +8 -0
  29. package/src/equations/sdt-equation.js +141 -0
  30. package/src/examples/double-interactive.js +171 -0
  31. package/src/examples/human.js +184 -0
  32. package/src/examples/index.js +6 -0
  33. package/src/examples/interactive.js +131 -0
  34. package/src/examples/model.js +203 -0
  35. package/src/examples/sdt-example.js +76 -0
  36. package/src/examples/unequal.js +43 -0
  37. package/src/index.js +6 -0
@@ -0,0 +1,121 @@
1
+
2
+ import {
3
+ css,
4
+ unsafeCSS,
5
+ } from 'lit';
6
+ import * as d3 from 'd3';
7
+
8
+ import {DecidablesElement} from '@decidables/decidables-elements';
9
+
10
+ /*
11
+ DetectableElement Base Class - Not intended for instantiation!
12
+ <detectable-element>
13
+ */
14
+ export default class DetectableElement extends DecidablesElement {
15
+ static get properties() {
16
+ return {
17
+ interactive: {
18
+ attribute: 'interactive',
19
+ type: Boolean,
20
+ reflect: true,
21
+ },
22
+ };
23
+ }
24
+
25
+ constructor() {
26
+ super();
27
+ this.interactive = false;
28
+ }
29
+
30
+ static get colors() {
31
+ return {
32
+ h: d3.schemeSet1[2],
33
+ m: d3.schemeSet1[4],
34
+ fa: d3.schemeSet1[1],
35
+ cr: d3.schemeSet1[0],
36
+ hr: d3.schemeSet1[5],
37
+ far: d3.schemeSet1[3],
38
+ acc: d3.schemeSet1[8],
39
+ d: d3.schemeSet1[7],
40
+ c: d3.schemeSet1[6],
41
+ s: '#4545d0',
42
+ present: '#f032e6',
43
+ absent: '#10dbc9',
44
+ correct: '#ffffff',
45
+ error: '#000000',
46
+ nr: '#cccccc',
47
+ };
48
+ }
49
+
50
+ static get lights() {
51
+ return Object.keys(DetectableElement.colors).reduce((acc, cur) => {
52
+ acc[cur] = d3.interpolateRgb(DetectableElement.colors[cur], '#ffffff')(0.5);
53
+ return acc;
54
+ }, {});
55
+ }
56
+
57
+ static get darks() {
58
+ return Object.keys(DetectableElement.colors).reduce((acc, cur) => {
59
+ acc[cur] = d3.interpolateRgb(DetectableElement.colors[cur], '#000000')(0.5);
60
+ return acc;
61
+ }, {});
62
+ }
63
+
64
+
65
+ static get styles() {
66
+ return [
67
+ super.styles,
68
+ css`
69
+ :host {
70
+ ---color-h: var(--color-h, ${unsafeCSS(this.colors.h)});
71
+ ---color-m: var(--color-m, ${unsafeCSS(this.colors.m)});
72
+ ---color-fa: var(--color-fa, ${unsafeCSS(this.colors.fa)});
73
+ ---color-cr: var(--color-cr, ${unsafeCSS(this.colors.cr)});
74
+ ---color-hr: var(--color-hr, ${unsafeCSS(this.colors.hr)});
75
+ ---color-far: var(--color-far, ${unsafeCSS(this.colors.far)});
76
+ ---color-acc: var(--color-acc, ${unsafeCSS(this.colors.acc)});
77
+ ---color-d: var(--color-d, ${unsafeCSS(this.colors.d)});
78
+ ---color-c: var(--color-c, ${unsafeCSS(this.colors.c)});
79
+ ---color-s: var(--color-s, ${unsafeCSS(this.colors.s)});
80
+ ---color-present: var(--color-present, ${unsafeCSS(this.colors.present)});
81
+ ---color-absent: var(--color-absent, ${unsafeCSS(this.colors.absent)});
82
+ ---color-correct: var(--color-correct, ${unsafeCSS(this.colors.correct)});
83
+ ---color-error: var(--color-error, ${unsafeCSS(this.colors.error)});
84
+ ---color-nr: var(--color-nr, ${unsafeCSS(this.colors.nr)});
85
+
86
+ ---color-h-light: var(--color-h-light, ${unsafeCSS(this.lights.h)});
87
+ ---color-m-light: var(--color-m-light, ${unsafeCSS(this.lights.m)});
88
+ ---color-fa-light: var(--color-fa-light, ${unsafeCSS(this.lights.fa)});
89
+ ---color-cr-light: var(--color-cr-light, ${unsafeCSS(this.lights.cr)});
90
+ ---color-hr-light: var(--color-hr-light, ${unsafeCSS(this.lights.hr)});
91
+ ---color-far-light: var(--color-far-light, ${unsafeCSS(this.lights.far)});
92
+ ---color-acc-light: var(--color-acc-light, ${unsafeCSS(this.lights.acc)});
93
+ ---color-d-light: var(--color-d-light, ${unsafeCSS(this.lights.d)});
94
+ ---color-c-light: var(--color-c-light, ${unsafeCSS(this.lights.c)});
95
+ ---color-s-light: var(--color-s-light, ${unsafeCSS(this.lights.s)});
96
+ ---color-present-light: var(--color-present-light, ${unsafeCSS(this.lights.present)});
97
+ ---color-absent-light: var(--color-absent-light, ${unsafeCSS(this.lights.absent)});
98
+ ---color-correct-light: var(--color-correct-light, ${unsafeCSS(this.lights.correct)});
99
+ ---color-error-light: var(--color-error-light, ${unsafeCSS(this.lights.error)});
100
+ ---color-nr-light: var(--color-nr-light, ${unsafeCSS(this.lights.nr)});
101
+
102
+ ---color-h-dark: var(--color-h-dark, ${unsafeCSS(this.darks.h)});
103
+ ---color-m-dark: var(--color-m-dark, ${unsafeCSS(this.darks.m)});
104
+ ---color-fa-dark: var(--color-fa-dark, ${unsafeCSS(this.darks.fa)});
105
+ ---color-cr-dark: var(--color-cr-dark, ${unsafeCSS(this.darks.cr)});
106
+ ---color-hr-dark: var(--color-hr-dark, ${unsafeCSS(this.darks.hr)});
107
+ ---color-far-dark: var(--color-far-dark, ${unsafeCSS(this.darks.far)});
108
+ ---color-acc-dark: var(--color-acc-dark, ${unsafeCSS(this.darks.acc)});
109
+ ---color-d-dark: var(--color-d-dark, ${unsafeCSS(this.darks.d)});
110
+ ---color-c-dark: var(--color-c-dark, ${unsafeCSS(this.darks.c)});
111
+ ---color-s-dark: var(--color-s-dark, ${unsafeCSS(this.darks.s)});
112
+ ---color-present-dark: var(--color-present-dark, ${unsafeCSS(this.darks.present)});
113
+ ---color-absent-dark: var(--color-absent-dark, ${unsafeCSS(this.darks.absent)});
114
+ ---color-correct-dark: var(--color-correct-dark, ${unsafeCSS(this.darks.correct)});
115
+ ---color-error-dark: var(--color-error-dark, ${unsafeCSS(this.darks.error)});
116
+ ---color-nr-dark: var(--color-nr-dark, ${unsafeCSS(this.darks.nr)});
117
+ }
118
+ `,
119
+ ];
120
+ }
121
+ }
@@ -0,0 +1,182 @@
1
+
2
+ import {html} from 'lit';
3
+
4
+ import '@decidables/decidables-elements/spinner';
5
+ import SDTMath from '@decidables/detectable-math';
6
+
7
+ import SDTEquation from './sdt-equation';
8
+
9
+ /*
10
+ SDTEquationDC2Far element
11
+ <sdt-equation-dc2far>
12
+
13
+ Attributes:
14
+ d'; c; False Alarm Rate;
15
+ */
16
+ export default class SDTEquationDC2Far extends SDTEquation {
17
+ static get properties() {
18
+ return {
19
+ unequal: {
20
+ attribute: 'unequal',
21
+ type: Boolean,
22
+ reflect: true,
23
+ },
24
+ d: {
25
+ attribute: 'd',
26
+ type: Number,
27
+ reflect: true,
28
+ },
29
+ c: {
30
+ attribute: 'c',
31
+ type: Number,
32
+ reflect: true,
33
+ },
34
+ s: {
35
+ attribute: 's',
36
+ type: Number,
37
+ reflect: true,
38
+ },
39
+
40
+ far: {
41
+ attribute: false,
42
+ type: Number,
43
+ reflect: false,
44
+ },
45
+ };
46
+ }
47
+
48
+ constructor() {
49
+ super();
50
+ this.unequal = false;
51
+ this.d = 0;
52
+ this.c = 0;
53
+ this.s = 1;
54
+ this.alignState();
55
+ }
56
+
57
+ alignState() {
58
+ this.far = SDTMath.dC2Far(this.d, this.c, this.s);
59
+ }
60
+
61
+ sendEvent() {
62
+ this.dispatchEvent(new CustomEvent('sdt-equation-dc2far-change', {
63
+ detail: {
64
+ d: this.d,
65
+ c: this.c,
66
+ s: this.s,
67
+ far: this.far,
68
+ },
69
+ bubbles: true,
70
+ }));
71
+ }
72
+
73
+ dInput(event) {
74
+ this.d = parseFloat(event.target.value);
75
+ this.alignState();
76
+ this.sendEvent();
77
+ }
78
+
79
+ cInput(event) {
80
+ this.c = parseFloat(event.target.value);
81
+ this.alignState();
82
+ this.sendEvent();
83
+ }
84
+
85
+ sInput(event) {
86
+ this.s = parseFloat(event.target.value);
87
+ this.alignState();
88
+ this.sendEvent();
89
+ }
90
+
91
+ render() {
92
+ this.alignState();
93
+ let d;
94
+ let c;
95
+ let s;
96
+ let far;
97
+ if (this.numeric) {
98
+ d = html`
99
+ <decidables-spinner class="d bottom" ?disabled=${!this.interactive} step=".001" .value="${this.d}" @input=${this.dInput.bind(this)}>
100
+ <var class="math-var">d′</var>
101
+ </decidables-spinner>
102
+ `;
103
+ c = html`
104
+ <decidables-spinner class="c bottom" ?disabled=${!this.interactive} step=".001" .value="${this.c}" @input=${this.cInput.bind(this)}>
105
+ <var class="math-var">c</var>
106
+ </decidables-spinner>
107
+ `;
108
+ s = html`
109
+ <decidables-spinner class="s bottom" ?disabled=${!this.interactive} min="0" step=".001" .value="${this.s}" @input=${this.sInput.bind(this)}>
110
+ <var class="math-var">σ</var>
111
+ </decidables-spinner>
112
+ `;
113
+ far = html`
114
+ <decidables-spinner class="far bottom" disabled min="0" max="1" step=".001" .value="${+this.far.toFixed(3)}">
115
+ <var>False Alarm Rate</var>
116
+ </decidables-spinner>
117
+ `;
118
+ } else {
119
+ d = html`<var class="math-var d">d′</var>`;
120
+ c = html`<var class="math-var c">c</var>`;
121
+ s = html`<var class="math-var s">σ</var>`;
122
+ far = html`<var class="far">False Alarm Rate</var>`;
123
+ }
124
+ let equation;
125
+ if (this.unequal) {
126
+ equation = html`
127
+ <tr>
128
+ <td rowspan="2">
129
+ ${far}<span class="equals">=</span><var class="math-greek phi tight">Φ</var><span class="paren tight">(</span><span class="bracket tight">[</span>
130
+ </td>
131
+ <td class="underline bottom">
132
+ <span>1</span><span class="plus tight">+</span><span>${s}<sup class="exp">2</sup></span>
133
+ </td>
134
+ <td rowspan="2">
135
+ <span class="bracket tight">]<sup class="exp">½</sup></span><span class="bracket tight">[</span>
136
+ </td>
137
+ <td class="underline">
138
+ <span class="minus tight">−</span>${d}
139
+ </td>
140
+ <td rowspan="2">
141
+ <span class="minus">−</span>${c}<span class="bracket tight">]</span><span class="paren tight">)</span>
142
+ </td>
143
+ </tr>
144
+ <tr>
145
+ <td>
146
+ <span>2</span>
147
+ </td>
148
+ <td>
149
+ <span><span>1</span><span class="plus">+</span>${s}</span>
150
+ </td>
151
+ </tr>`;
152
+ } else {
153
+ equation = html`
154
+ <tr>
155
+ <td rowspan="2">
156
+ ${far}<span class="equals">=</span><var class="math-greek phi tight">Φ</var><span class="paren tight">(</span><span class="minus tight">−</span>
157
+ </td>
158
+ <td class="underline">
159
+ ${d}
160
+ </td>
161
+ <td rowspan="2">
162
+ <span class="minus">−</span>${c}<span class="paren tight">)</span>
163
+ </td>
164
+ </tr>
165
+ <tr>
166
+ <td>
167
+ <span>2</span>
168
+ </td>
169
+ </tr>`;
170
+ }
171
+ return html`
172
+ <div class="holder">
173
+ <table class="equation">
174
+ <tbody>
175
+ ${equation}
176
+ </tbody>
177
+ </table>
178
+ </div>`;
179
+ }
180
+ }
181
+
182
+ customElements.define('sdt-equation-dc2far', SDTEquationDC2Far);
@@ -0,0 +1,191 @@
1
+
2
+ import {html} from 'lit';
3
+
4
+ import '@decidables/decidables-elements/spinner';
5
+ import SDTMath from '@decidables/detectable-math';
6
+
7
+ import SDTEquation from './sdt-equation';
8
+
9
+ /*
10
+ SDTEquationDC2Hr element
11
+ <sdt-equation-dc2hr>
12
+
13
+ Attributes:
14
+ d'; c; Hit Rate;
15
+ */
16
+ export default class SDTEquationDC2Hr extends SDTEquation {
17
+ static get properties() {
18
+ return {
19
+ unequal: {
20
+ attribute: 'unequal',
21
+ type: Boolean,
22
+ reflect: true,
23
+ },
24
+ d: {
25
+ attribute: 'd',
26
+ type: Number,
27
+ reflect: true,
28
+ },
29
+ c: {
30
+ attribute: 'c',
31
+ type: Number,
32
+ reflect: true,
33
+ },
34
+ s: {
35
+ attribute: 's',
36
+ type: Number,
37
+ reflect: true,
38
+ },
39
+
40
+ hr: {
41
+ attribute: false,
42
+ type: Number,
43
+ reflect: false,
44
+ },
45
+ };
46
+ }
47
+
48
+ constructor() {
49
+ super();
50
+ this.unequal = false;
51
+ this.d = 0;
52
+ this.c = 0;
53
+ this.s = 1;
54
+ this.alignState();
55
+ }
56
+
57
+ alignState() {
58
+ this.hr = SDTMath.dC2Hr(this.d, this.c, this.s);
59
+ }
60
+
61
+ sendEvent() {
62
+ this.dispatchEvent(new CustomEvent('sdt-equation-dc2hr-change', {
63
+ detail: {
64
+ d: this.d,
65
+ c: this.c,
66
+ s: this.s,
67
+ hr: this.hr,
68
+ },
69
+ bubbles: true,
70
+ }));
71
+ }
72
+
73
+ dInput(event) {
74
+ this.d = parseFloat(event.target.value);
75
+ this.alignState();
76
+ this.sendEvent();
77
+ }
78
+
79
+ cInput(event) {
80
+ this.c = parseFloat(event.target.value);
81
+ this.alignState();
82
+ this.sendEvent();
83
+ }
84
+
85
+ sInput(event) {
86
+ this.s = parseFloat(event.target.value);
87
+ this.alignState();
88
+ this.sendEvent();
89
+ }
90
+
91
+ render() {
92
+ this.alignState();
93
+ let d;
94
+ let c;
95
+ let s;
96
+ let hr;
97
+ if (this.numeric) {
98
+ d = html`
99
+ <decidables-spinner class="d bottom" ?disabled=${!this.interactive} step=".001" .value="${this.d}" @input=${this.dInput.bind(this)}>
100
+ <var class="math-var">d′</var>
101
+ </decidables-spinner>
102
+ `;
103
+ c = html`
104
+ <decidables-spinner class="c bottom" ?disabled=${!this.interactive} step=".001" .value="${this.c}" @input=${this.cInput.bind(this)}>
105
+ <var class="math-var">c</var>
106
+ </decidables-spinner>
107
+ `;
108
+ s = html`
109
+ <decidables-spinner class="s bottom" ?disabled=${!this.interactive} min="0" step=".001" .value="${this.s}" @input=${this.sInput.bind(this)}>
110
+ <var class="math-var">σ</var>
111
+ </decidables-spinner>
112
+ `;
113
+ hr = html`
114
+ <decidables-spinner class="hr bottom" disabled min="0" max="1" step=".001" .value="${+this.hr.toFixed(3)}">
115
+ <var>Hit Rate</var>
116
+ </decidables-spinner>
117
+ `;
118
+ } else {
119
+ d = html`<var class="math-var d">d′</var>`;
120
+ c = html`<var class="math-var c">c</var>`;
121
+ s = html`<var class="math-var s">σ</var>`;
122
+ hr = html`<var class="hr">Hit Rate</var>`;
123
+ }
124
+ let equation;
125
+ if (this.unequal) {
126
+ equation = html`
127
+ <tr>
128
+ <td rowspan="2">
129
+ ${hr}<span class="equals">=</span><var class="math-greek phi tight">Φ</var><span class="paren tight">(</span><span class="bracket tight">[</span>
130
+ </td>
131
+ <td class="underline bottom">
132
+ <span>1</span><span class="plus tight">+</span><span>${s}<sup class="exp">2</sup></span>
133
+ </td>
134
+ <td rowspan="2">
135
+ <span class="bracket tight">]<sup class="exp">½</sup></span><span class="bracket tight">[</span>
136
+ </td>
137
+ <td class="underline">
138
+ ${d}
139
+ </td>
140
+ <td rowspan="2">
141
+ <span class="minus">−</span>
142
+ </td>
143
+ <td class="underline">
144
+ ${c}
145
+ </td>
146
+ <td rowspan="2">
147
+ <span class="bracket tight">]</span><span class="paren tight">)</span>
148
+ </td>
149
+ </tr>
150
+ <tr>
151
+ <td>
152
+ <span>2</span>
153
+ </td>
154
+ <td>
155
+ <span><span>1</span><span class="plus">+</span>${s}</span>
156
+ </td>
157
+ <td>
158
+ ${s}
159
+ </td>
160
+ </tr>`;
161
+ } else {
162
+ equation = html`
163
+ <tr>
164
+ <td rowspan="2">
165
+ ${hr}<span class="equals">=</span><var class="math-greek phi tight">Φ</var><span class="paren tight">(</span>
166
+ </td>
167
+ <td class="underline">
168
+ ${d}
169
+ </td>
170
+ <td rowspan="2">
171
+ <span class="minus">−</span>${c}<span class="paren tight">)</span>
172
+ </td>
173
+ </tr>
174
+ <tr>
175
+ <td>
176
+ <span>2</span>
177
+ </td>
178
+ </tr>`;
179
+ }
180
+ return html`
181
+ <div class="holder">
182
+ <table class="equation">
183
+ <tbody>
184
+ ${equation}
185
+ </tbody>
186
+ </table>
187
+ </div>`;
188
+ }
189
+ }
190
+
191
+ customElements.define('sdt-equation-dc2hr', SDTEquationDC2Hr);
@@ -0,0 +1,120 @@
1
+
2
+ import {html} from 'lit';
3
+
4
+ import '@decidables/decidables-elements/spinner';
5
+ import SDTMath from '@decidables/detectable-math';
6
+
7
+ import SDTEquation from './sdt-equation';
8
+
9
+ /*
10
+ SDTEquationFaCr2Far element
11
+ <sdt-equation-facr2far>
12
+
13
+ Attributes:
14
+ False Alarms; Correct Rejections; False Alarm Rate;
15
+ */
16
+ export default class SDTEquationFaCr2Far extends SDTEquation {
17
+ static get properties() {
18
+ return {
19
+ fa: {
20
+ attribute: 'false-alarms',
21
+ type: Number,
22
+ reflect: true,
23
+ },
24
+ cr: {
25
+ attribute: 'correct-rejections',
26
+ type: Number,
27
+ reflect: true,
28
+ },
29
+ far: {
30
+ attribute: false,
31
+ type: Number,
32
+ reflect: false,
33
+ },
34
+ };
35
+ }
36
+
37
+ constructor() {
38
+ super();
39
+ this.fa = 0;
40
+ this.cr = 0;
41
+ this.alignState();
42
+ }
43
+
44
+ alignState() {
45
+ this.far = SDTMath.faCr2Far(this.fa, this.cr);
46
+ }
47
+
48
+ sendEvent() {
49
+ this.dispatchEvent(new CustomEvent('sdt-equation-facr2far-change', {
50
+ detail: {
51
+ fa: this.fa,
52
+ cr: this.cr,
53
+ far: this.far,
54
+ },
55
+ bubbles: true,
56
+ }));
57
+ }
58
+
59
+ faInput(event) {
60
+ this.fa = parseInt(event.target.value, 10);
61
+ this.alignState();
62
+ this.sendEvent();
63
+ }
64
+
65
+ crInput(event) {
66
+ this.cr = parseInt(event.target.value, 10);
67
+ this.alignState();
68
+ this.sendEvent();
69
+ }
70
+
71
+ render() {
72
+ this.alignState();
73
+ let fa;
74
+ let cr;
75
+ let far;
76
+ if (this.numeric) {
77
+ fa = html`
78
+ <decidables-spinner class="fa" ?disabled=${!this.interactive} min="0" .value="${this.fa}" @input=${this.faInput.bind(this)}>
79
+ <var>False Alarms</var>
80
+ </decidables-spinner>
81
+ `;
82
+ cr = html`
83
+ <decidables-spinner class="cr" ?disabled=${!this.interactive} min="0" .value="${this.cr}" @input=${this.crInput.bind(this)}>
84
+ <var>Correct Rejections</var>
85
+ </decidables-spinner>
86
+ `;
87
+ far = html`
88
+ <decidables-spinner class="far" disabled min="0" max="1" step=".001" .value="${+this.far.toFixed(3)}">
89
+ <var>False Alarm Rate</var>
90
+ </decidables-spinner>
91
+ `;
92
+ } else {
93
+ fa = html`<var class="fa">False Alarms</var>`;
94
+ cr = html`<var class="cr">Correct Rejections</var>`;
95
+ far = html`<var class="far">False Alarm Rate</var>`;
96
+ }
97
+ return html`
98
+ <div class="holder">
99
+ <table class="equation">
100
+ <tbody>
101
+ <tr>
102
+ <td rowspan="2">
103
+ ${far}<span class="equals">=</span>
104
+ </td>
105
+ <td class="underline">
106
+ ${fa}
107
+ </td>
108
+ </tr>
109
+ <tr>
110
+ <td>
111
+ ${fa}<span class="plus">+</span>${cr}
112
+ </td>
113
+ </tr>
114
+ </tbody>
115
+ </table>
116
+ </div>`;
117
+ }
118
+ }
119
+
120
+ customElements.define('sdt-equation-facr2far', SDTEquationFaCr2Far);