@lucern/confidence 0.3.0-alpha.9 → 1.0.1
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.
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/v1/codec.js +12 -9
- package/dist/v1/codec.js.map +1 -1
- package/dist/v1/index.js +4 -2
- package/dist/v1/index.js.map +1 -1
- package/dist/v1/operations/approximation.js +4 -2
- package/dist/v1/operations/approximation.js.map +1 -1
- package/dist/v1/operations/bridge/index.js +12 -9
- package/dist/v1/operations/bridge/index.js.map +1 -1
- package/dist/v1/operations/canonical.js +4 -2
- package/dist/v1/operations/canonical.js.map +1 -1
- package/dist/v1/operations/dynamics/cascade.js +4 -2
- package/dist/v1/operations/dynamics/cascade.js.map +1 -1
- package/dist/v1/operations/dynamics/decay.js +1 -2
- package/dist/v1/operations/dynamics/decay.js.map +1 -1
- package/dist/v1/operations/dynamics/defeat.js +4 -2
- package/dist/v1/operations/dynamics/defeat.js.map +1 -1
- package/dist/v1/operations/dynamics/propagation.js +4 -2
- package/dist/v1/operations/dynamics/propagation.js.map +1 -1
- package/dist/v1/operations/dynamics/revision.js +4 -1
- package/dist/v1/operations/dynamics/revision.js.map +1 -1
- package/dist/v1/operations/index.js +4 -2
- package/dist/v1/operations/index.js.map +1 -1
- package/dist/v1/operations/lucern.js +4 -2
- package/dist/v1/operations/lucern.js.map +1 -1
- package/dist/v1/operations/scoring.js +11 -8
- package/dist/v1/operations/scoring.js.map +1 -1
- package/dist/v1/operations/subjectiveLogic/index.d.ts +1 -1
- package/dist/v1/operations/subjectiveLogic/index.js +4 -2
- package/dist/v1/operations/subjectiveLogic/index.js.map +1 -1
- package/dist/v1/operations/temporalDecay.js +4 -2
- package/dist/v1/operations/temporalDecay.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
// src/v1/codec.ts
|
|
4
4
|
|
|
5
5
|
// src/v1/operations/subjectiveLogic/index.ts
|
|
6
|
-
function
|
|
6
|
+
function opinion(belief, disbelief, uncertainty, baseRate) {
|
|
7
7
|
const b = Number.isFinite(belief) ? Math.max(0, belief) : 0;
|
|
8
8
|
const d = Number.isFinite(disbelief) ? Math.max(0, disbelief) : 0;
|
|
9
9
|
const u = Number.isFinite(uncertainty) ? Math.max(0, uncertainty) : 0;
|
|
@@ -19,7 +19,9 @@ function mkOpinion(belief, disbelief, uncertainty, baseRate) {
|
|
|
19
19
|
a
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
function mkOpinion(belief, disbelief, uncertainty, baseRate) {
|
|
23
|
+
return opinion(belief, disbelief, uncertainty, baseRate);
|
|
24
|
+
}
|
|
23
25
|
function vacuous(baseRate) {
|
|
24
26
|
return mkOpinion(0, 0, 1, baseRate);
|
|
25
27
|
}
|