prographs 0.12.0 → 0.13.0
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/CHANGELOG.md +9 -1
- package/README.md +6 -4
- package/dist/AutoGraph-PDPEAIXL.cjs +145 -0
- package/dist/GraphType.js +19 -0
- package/dist/autograph/chartIndex.js +521 -0
- package/dist/autograph/chartModules.js +2 -1
- package/dist/autograph/index.cjs +98 -93
- package/dist/catalog-DI4XZ46L.cjs +142 -0
- package/dist/catalog.js +2 -1
- package/dist/charts/biologycharts/BiologySamples.js +59 -0
- package/dist/charts/biologycharts/PunnettSquare.js +342 -0
- package/dist/charts/biologycharts/biologyEnums.js +22 -1
- package/dist/charts/biologycharts/index.js +5 -3
- package/dist/charts/doecharts/DoeSamples.js +78 -0
- package/dist/charts/doecharts/SipocDiagram.js +453 -0
- package/dist/charts/doecharts/index.js +4 -2
- package/dist/charts/fieldcharts/SpeciesAccumulationCurve.js +350 -0
- package/dist/charts/fieldcharts/fieldEnums.js +8 -1
- package/dist/charts/fieldcharts/index.js +5 -3
- package/dist/charts/signals/AntennaPatternChart.js +492 -0
- package/dist/charts/signals/SignalSamples.js +17 -0
- package/dist/charts/signals/index.js +5 -3
- package/dist/charts/softwarediagrams/ComponentDiagram.js +504 -0
- package/dist/charts/softwarediagrams/DeploymentDiagram.js +419 -0
- package/dist/charts/softwarediagrams/SoftwareSamples.js +283 -1
- package/dist/charts/softwarediagrams/index.js +7 -3
- package/dist/charts/softwarediagrams/softwareEnums.js +45 -1
- package/dist/charts/sportscharts/PowerDurationCurve.js +301 -0
- package/dist/charts/sportscharts/SportsSamples.js +102 -0
- package/dist/charts/sportscharts/TrainingLoadChart.js +325 -0
- package/dist/charts/sportscharts/index.js +6 -2
- package/dist/charts/strategycharts/BassDiffusionChart.js +362 -0
- package/dist/charts/strategycharts/BassModel.js +96 -0
- package/dist/charts/strategycharts/BurnRunwayChart.js +284 -0
- package/dist/charts/strategycharts/CapTableChart.js +366 -0
- package/dist/charts/strategycharts/KanbanBoard.js +324 -0
- package/dist/charts/strategycharts/OkrTree.js +339 -0
- package/dist/charts/strategycharts/StrategyPane.js +27 -0
- package/dist/charts/strategycharts/StrategySamples.js +251 -0
- package/dist/charts/strategycharts/index.js +15 -3
- package/dist/charts/threefields/BsfcMap3DChart.js +231 -0
- package/dist/charts/threefields/CompressorMap3DChart.js +217 -0
- package/dist/charts/threefields/FieldGrid.js +50 -0
- package/dist/charts/threefields/LossLandscape3DChart.js +201 -0
- package/dist/charts/threefields/MapSheet.js +77 -0
- package/dist/charts/threefields/TerrainRoute3DChart.js +201 -0
- package/dist/charts/threefields/TerrainRouteMath.js +40 -0
- package/dist/charts/threefields/ThreeFieldBase.js +117 -0
- package/dist/charts/threefields/ThreeFieldsSamples.js +80 -0
- package/dist/charts/threefields/WaferMap3DChart.js +218 -0
- package/dist/charts/threefields/index.js +19 -0
- package/dist/charts/threesurfaces/index.js +2 -2
- package/dist/charts/tradingcharts/KeltnerChannelChart.js +171 -0
- package/dist/charts/tradingcharts/TradingMath.js +20 -0
- package/dist/charts/tradingcharts/index.js +4 -2
- package/dist/{chunk-ZL6XDXMK.cjs → chunk-26PSLEP4.cjs} +8 -8
- package/dist/{chunk-W3US6EFP.cjs → chunk-2BO5DZUP.cjs} +12 -12
- package/dist/{chunk-5DP7OUSE.cjs → chunk-2GG5YYSC.cjs} +6 -6
- package/dist/{chunk-7FG4JSVO.cjs → chunk-2GL2VNJU.cjs} +253 -33
- package/dist/{chunk-LCWMRCLF.cjs → chunk-2PYOI7OY.cjs} +21 -21
- package/dist/{chunk-JFWJAEBD.cjs → chunk-3U4MCSKI.cjs} +4 -4
- package/dist/{chunk-CUPLHZRR.cjs → chunk-3ZMM3FSK.cjs} +4 -4
- package/dist/{chunk-L2AV62DP.cjs → chunk-4767WQJ7.cjs} +6 -6
- package/dist/{chunk-DA2EYIIP.cjs → chunk-4E7FSSBF.cjs} +1210 -168
- package/dist/{chunk-VS5LQEZB.cjs → chunk-526STI2S.cjs} +5 -5
- package/dist/{chunk-RXIMEK6C.cjs → chunk-55767YPI.cjs} +20 -20
- package/dist/{chunk-JXLSKIUV.cjs → chunk-5FBQOMMT.cjs} +26 -26
- package/dist/{chunk-27PZV5BR.cjs → chunk-5N4Z7MTS.cjs} +4 -4
- package/dist/{chunk-KEWCUIQA.cjs → chunk-5WEV6YWA.cjs} +22 -22
- package/dist/chunk-5XOVVC5X.cjs +3281 -0
- package/dist/{chunk-HK5J7Q2W.cjs → chunk-6HLXVWXU.cjs} +9 -9
- package/dist/{chunk-7JG47RW4.cjs → chunk-6LQT4WJ5.cjs} +25 -25
- package/dist/{chunk-OCVTI6X4.cjs → chunk-6YTWOUFD.cjs} +329 -36
- package/dist/{chunk-W7IQCAVN.cjs → chunk-7F6W6HKL.cjs} +11 -11
- package/dist/{chunk-F2DCJXDM.cjs → chunk-7L6KYU5A.cjs} +21 -21
- package/dist/{chunk-GTGR6LPR.cjs → chunk-A4GIN4FE.cjs} +17 -17
- package/dist/{chunk-B2CETSR6.cjs → chunk-A4US7SA7.cjs} +5 -5
- package/dist/{chunk-3DIF2YYW.cjs → chunk-AOXPBLPW.cjs} +10 -10
- package/dist/{chunk-7TTR4UF5.cjs → chunk-ATI45Z4M.cjs} +2 -2
- package/dist/{chunk-5BFCIX2V.cjs → chunk-CPPMO4IQ.cjs} +434 -148
- package/dist/{chunk-AYZZQ6AC.cjs → chunk-CZ5KGF6Q.cjs} +9 -9
- package/dist/{chunk-7THJ3ZBK.cjs → chunk-D4I35MCE.cjs} +2 -2
- package/dist/{chunk-MCPPFRLN.cjs → chunk-DCGAAN3Z.cjs} +2 -2
- package/dist/{chunk-VABL6CVX.cjs → chunk-DEY36N37.cjs} +21 -21
- package/dist/{chunk-RNCKGJCC.cjs → chunk-DXHXD3DK.cjs} +3 -3
- package/dist/{chunk-A56ZGMVZ.cjs → chunk-E7B45DBZ.cjs} +11 -11
- package/dist/{chunk-DOR6L4MT.cjs → chunk-EJC6EAC5.cjs} +18 -18
- package/dist/{chunk-UPGNM7MA.cjs → chunk-EULJOOMA.cjs} +11 -11
- package/dist/{chunk-G4AZL4GO.cjs → chunk-EYM6LEIF.cjs} +474 -70
- package/dist/{chunk-NJ4X6XGV.cjs → chunk-EZTYX2GH.cjs} +5 -5
- package/dist/chunk-FDD4UP73.cjs +521 -0
- package/dist/{chunk-WJ3VH2Q4.cjs → chunk-GEAIGM3J.cjs} +110 -615
- package/dist/{chunk-P3SBHF43.cjs → chunk-GRUYVXTS.cjs} +2 -2
- package/dist/{chunk-NX4Z5LMS.cjs → chunk-H3SZXND5.cjs} +5 -5
- package/dist/{chunk-EE4S4TOE.cjs → chunk-HS45TOFJ.cjs} +21 -21
- package/dist/chunk-INGOG6OV.cjs +899 -0
- package/dist/{chunk-UDKA6DGT.cjs → chunk-J3CDXZHF.cjs} +4 -4
- package/dist/{chunk-YO6G7TKI.cjs → chunk-JAU5ADEU.cjs} +11 -11
- package/dist/{chunk-22LBK4GA.cjs → chunk-JQEBSHX3.cjs} +4 -4
- package/dist/{chunk-RXX3U7VQ.cjs → chunk-KLXGLMFU.cjs} +10 -10
- package/dist/chunk-KVOX36J3.cjs +327 -0
- package/dist/chunk-L6BGNHFL.cjs +139 -0
- package/dist/{chunk-GMER35L3.cjs → chunk-L7TB7PU5.cjs} +20 -20
- package/dist/{chunk-AFXYNBL2.cjs → chunk-LBTRYEM2.cjs} +4 -4
- package/dist/{chunk-WYYCKIOD.cjs → chunk-LLULNJSP.cjs} +11 -11
- package/dist/{chunk-J27XOSLP.cjs → chunk-LSO46AFV.cjs} +8 -8
- package/dist/{chunk-5XJO45ES.cjs → chunk-LZ2KJ7ZX.cjs} +11 -11
- package/dist/chunk-M4IQ5LIZ.cjs +422 -0
- package/dist/{chunk-Y2KIUKJF.cjs → chunk-MPDHDKYZ.cjs} +11 -11
- package/dist/{chunk-4EMPKRZU.cjs → chunk-MRQ42ZJE.cjs} +3 -3
- package/dist/{chunk-EU5D2MF4.cjs → chunk-MYV4KZWP.cjs} +9 -9
- package/dist/{chunk-XD7KN4UN.cjs → chunk-MZXVLC24.cjs} +6 -6
- package/dist/{chunk-PPSONARU.cjs → chunk-NLBVDFIR.cjs} +41 -2
- package/dist/{chunk-L3PEGMGM.cjs → chunk-NY3TBZY4.cjs} +33 -33
- package/dist/{chunk-6YNYXXB6.cjs → chunk-OGVVSFAR.cjs} +3 -3
- package/dist/{chunk-MLV7QLB6.cjs → chunk-OMTQIQMN.cjs} +6 -6
- package/dist/{chunk-BEEOSNK7.cjs → chunk-PEJJ6TXJ.cjs} +15 -144
- package/dist/{chunk-SOKOWUF5.cjs → chunk-PPGWHIU7.cjs} +2 -2
- package/dist/{chunk-IELWOM2J.cjs → chunk-PPO6SDAN.cjs} +6 -6
- package/dist/{chunk-6JTZZCSL.cjs → chunk-PUMKX5F2.cjs} +3 -3
- package/dist/{chunk-RFOXFY2U.cjs → chunk-PXBYWCNB.cjs} +190 -799
- package/dist/{chunk-3BYXOISI.cjs → chunk-Q3HB3IX6.cjs} +4 -4
- package/dist/{chunk-RXCOVONX.cjs → chunk-RBMUOIXE.cjs} +289 -34
- package/dist/{chunk-MSBNHCSE.cjs → chunk-RJHGCUUD.cjs} +6 -6
- package/dist/{chunk-I6VG7F6Z.cjs → chunk-RSONDMYW.cjs} +708 -141
- package/dist/{chunk-GZDNPHMT.cjs → chunk-SHMPFCUE.cjs} +19 -19
- package/dist/{chunk-ZIBVCOW6.cjs → chunk-SN4FCXFC.cjs} +19 -19
- package/dist/{chunk-7KM52NMN.cjs → chunk-SN5T7WYO.cjs} +2 -2
- package/dist/{chunk-7MSZR65Z.cjs → chunk-SQJZGVDR.cjs} +7 -7
- package/dist/chunk-SYABFMD7.cjs +633 -0
- package/dist/{chunk-2RRFEYFH.cjs → chunk-TICB3MAC.cjs} +16 -16
- package/dist/{chunk-AOOKHUV5.cjs → chunk-U7Z7XYR2.cjs} +5 -5
- package/dist/{chunk-JEWQAXVG.cjs → chunk-UA2THQFV.cjs} +6 -6
- package/dist/{chunk-LHZPAHU3.cjs → chunk-VIK4L2YF.cjs} +112 -521
- package/dist/{chunk-4YWMAQ4J.cjs → chunk-VM2Y6BDY.cjs} +4 -4
- package/dist/{chunk-IRRKE2ZE.cjs → chunk-VMS3KWYI.cjs} +21 -21
- package/dist/{chunk-4SLARW6F.cjs → chunk-VU5NUD46.cjs} +17 -17
- package/dist/{chunk-XHY6TVYG.cjs → chunk-VV5CVOF7.cjs} +13 -13
- package/dist/{chunk-CCIBPGPZ.cjs → chunk-VYSAWPSS.cjs} +57 -57
- package/dist/{chunk-TTNEMQ2A.cjs → chunk-W7YRWEWQ.cjs} +22 -22
- package/dist/{chunk-C7MUOGEW.cjs → chunk-X7R5SY62.cjs} +6 -6
- package/dist/{chunk-ILR5KBMB.cjs → chunk-XOK3KTSS.cjs} +6 -6
- package/dist/{chunk-2CZM2I3T.cjs → chunk-XUIX45VU.cjs} +19 -19
- package/dist/{chunk-TGRMPS3A.cjs → chunk-XWH46PVJ.cjs} +165 -43
- package/dist/{chunk-WQYXXECR.cjs → chunk-Y5XVMK3K.cjs} +6 -6
- package/dist/{chunk-AK4TX2WG.cjs → chunk-YCNKEDTG.cjs} +13 -13
- package/dist/{chunk-PJJB24DU.cjs → chunk-YEF7SE3X.cjs} +20 -20
- package/dist/{chunk-RVLV4XW6.cjs → chunk-YMTVPMU3.cjs} +22 -22
- package/dist/data/index.cjs +2 -2
- package/dist/entries/autograph-lazy.cjs +2 -2
- package/dist/entries/charts/acoustictransport.cjs +3 -3
- package/dist/entries/charts/analysischarts.cjs +3 -3
- package/dist/entries/charts/astrocharts.cjs +3 -3
- package/dist/entries/charts/bars.cjs +3 -3
- package/dist/entries/charts/bayesiancharts.cjs +3 -3
- package/dist/entries/charts/biocharts.cjs +3 -3
- package/dist/entries/charts/biologycharts.cjs +11 -3
- package/dist/entries/charts/biologycharts.d.ts +1 -1
- package/dist/entries/charts/biologycharts.js +3 -2
- package/dist/entries/charts/business.cjs +3 -3
- package/dist/entries/charts/carecharts.cjs +3 -3
- package/dist/entries/charts/chemistrycharts.cjs +3 -3
- package/dist/entries/charts/civicscharts.cjs +3 -3
- package/dist/entries/charts/clinicalcharts.cjs +3 -3
- package/dist/entries/charts/comparison.cjs +3 -3
- package/dist/entries/charts/demography.cjs +3 -3
- package/dist/entries/charts/density.cjs +3 -3
- package/dist/entries/charts/diagrams.cjs +3 -3
- package/dist/entries/charts/distribution.cjs +3 -3
- package/dist/entries/charts/doecharts.cjs +13 -3
- package/dist/entries/charts/doecharts.d.ts +1 -1
- package/dist/entries/charts/doecharts.js +2 -1
- package/dist/entries/charts/earthscience.cjs +3 -3
- package/dist/entries/charts/economicscharts.cjs +3 -3
- package/dist/entries/charts/energycharts.cjs +3 -3
- package/dist/entries/charts/engineering.cjs +3 -3
- package/dist/entries/charts/fieldcharts.cjs +7 -3
- package/dist/entries/charts/fieldcharts.d.ts +1 -1
- package/dist/entries/charts/fieldcharts.js +3 -2
- package/dist/entries/charts/financial.cjs +3 -3
- package/dist/entries/charts/flow.cjs +3 -3
- package/dist/entries/charts/frameworks.cjs +3 -3
- package/dist/entries/charts/genomics.cjs +3 -3
- package/dist/entries/charts/geoflows.cjs +3 -3
- package/dist/entries/charts/geomaps.cjs +3 -3
- package/dist/entries/charts/geosciencecharts.cjs +3 -3
- package/dist/entries/charts/hierarchy.cjs +3 -3
- package/dist/entries/charts/indicators.cjs +3 -3
- package/dist/entries/charts/inferencecharts.cjs +3 -3
- package/dist/entries/charts/layoutcharts.cjs +3 -3
- package/dist/entries/charts/lifescience.cjs +4 -4
- package/dist/entries/charts/linesareas.cjs +3 -3
- package/dist/entries/charts/logisticscharts.cjs +3 -3
- package/dist/entries/charts/machinecharts.cjs +7 -3
- package/dist/entries/charts/machinecharts.d.ts +1 -1
- package/dist/entries/charts/machinecharts.js +2 -1
- package/dist/entries/charts/massive.cjs +3 -3
- package/dist/entries/charts/mathematical.cjs +3 -3
- package/dist/entries/charts/matrix.cjs +3 -3
- package/dist/entries/charts/medicalcharts.cjs +4 -4
- package/dist/entries/charts/mlcharts.cjs +4 -4
- package/dist/entries/charts/modelcharts.cjs +6 -5
- package/dist/entries/charts/multivariate.cjs +3 -3
- package/dist/entries/charts/musiccharts.cjs +3 -3
- package/dist/entries/charts/network.cjs +3 -3
- package/dist/entries/charts/physicscharts.cjs +3 -3
- package/dist/entries/charts/pictorial.cjs +4 -4
- package/dist/entries/charts/portfoliocharts.cjs +3 -3
- package/dist/entries/charts/productcharts.cjs +3 -3
- package/dist/entries/charts/proportion.cjs +3 -3
- package/dist/entries/charts/qualitycharts.cjs +3 -3
- package/dist/entries/charts/radial.cjs +3 -3
- package/dist/entries/charts/reliabilitycharts.cjs +5 -3
- package/dist/entries/charts/scatter.cjs +3 -3
- package/dist/entries/charts/scientific.cjs +3 -3
- package/dist/entries/charts/seriescharts.cjs +3 -3
- package/dist/entries/charts/signals.cjs +7 -3
- package/dist/entries/charts/signals.d.ts +1 -1
- package/dist/entries/charts/signals.js +2 -1
- package/dist/entries/charts/softwarediagrams.cjs +21 -3
- package/dist/entries/charts/softwarediagrams.d.ts +1 -1
- package/dist/entries/charts/softwarediagrams.js +4 -2
- package/dist/entries/charts/sportscharts.cjs +13 -3
- package/dist/entries/charts/sportscharts.d.ts +1 -1
- package/dist/entries/charts/sportscharts.js +3 -1
- package/dist/entries/charts/statistics.cjs +6 -6
- package/dist/entries/charts/strategycharts.cjs +30 -3
- package/dist/entries/charts/strategycharts.d.ts +1 -1
- package/dist/entries/charts/strategycharts.js +6 -1
- package/dist/entries/charts/structure.cjs +3 -3
- package/dist/entries/charts/surveycharts.cjs +3 -3
- package/dist/entries/charts/systemscharts.cjs +3 -3
- package/dist/entries/charts/textcharts.cjs +5 -5
- package/dist/entries/charts/thematicmaps.cjs +4 -4
- package/dist/entries/charts/threebars.cjs +3 -3
- package/dist/entries/charts/threefields.cjs +53 -0
- package/dist/entries/charts/threefields.d.ts +1 -0
- package/dist/entries/charts/threefields.js +6 -0
- package/dist/entries/charts/threeglobe.cjs +3 -3
- package/dist/entries/charts/threenetwork.cjs +3 -3
- package/dist/entries/charts/threestrata.cjs +3 -3
- package/dist/entries/charts/threesurfaces.cjs +7 -3
- package/dist/entries/charts/threesurfaces.d.ts +1 -1
- package/dist/entries/charts/threesurfaces.js +2 -1
- package/dist/entries/charts/threevolume.cjs +4 -4
- package/dist/entries/charts/timeline.cjs +3 -3
- package/dist/entries/charts/tracecharts.cjs +3 -3
- package/dist/entries/charts/trackscharts.cjs +3 -3
- package/dist/entries/charts/tradingcharts.cjs +6 -4
- package/dist/entries/charts/tradingcharts.d.ts +1 -1
- package/dist/entries/charts/tradingcharts.js +2 -1
- package/dist/entries/three.cjs +60 -20
- package/dist/entries/three.d.ts +1 -1
- package/dist/entries/three.js +7 -1
- package/dist/index.cjs +258 -97
- package/dist/index.d.cts +1953 -10
- package/dist/index.d.ts +1953 -10
- package/dist/index.js +26 -5
- package/dist/page/index.cjs +2 -2
- package/dist/react/components.js +58 -1
- package/dist/react/index.cjs +135 -92
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +2 -2
- package/package.json +1 -1
- package/dist/AutoGraph-XLBJQDRB.cjs +0 -140
- package/dist/catalog-O7XGDD2H.cjs +0 -137
- package/dist/chunk-77K2HTRC.cjs +0 -3220
- package/dist/chunk-XEK47TVD.cjs +0 -323
- /package/dist/{chunk-UMEKIIHJ.cjs → chunk-LNWTC72Y.cjs} +0 -0
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class;
|
|
2
|
+
|
|
3
|
+
var _chunkAL4XQZH6cjs = require('./chunk-AL4XQZH6.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkEEF5WRRZcjs = require('./chunk-EEF5WRRZ.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkLNWTC72Ycjs = require('./chunk-LNWTC72Y.cjs');
|
|
10
|
+
|
|
11
|
+
// src/charts/reliabilitycharts/ReliabilitySamples.ts
|
|
12
|
+
var sig = (value, digits = 2) => +value.toPrecision(digits);
|
|
13
|
+
var ReliabilitySamples = class {
|
|
14
|
+
/** A cooling-water fault tree: `{ id, parent, label, gate, probability }`, with a probability on each basic event. */
|
|
15
|
+
static faultTree(seed) {
|
|
16
|
+
const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
|
|
17
|
+
const p = (base) => sig(base * (0.6 + 0.8 * u()));
|
|
18
|
+
const event = (id, parent, label, base) => ({ id, parent, label, gate: null, probability: p(base) });
|
|
19
|
+
const gate = (id, parent, label, kind) => ({ id, parent, label, gate: kind, probability: null });
|
|
20
|
+
return [
|
|
21
|
+
gate("TOP", null, "No cooling water flow", "or"),
|
|
22
|
+
gate("G1", "TOP", "Both pumps fail", "and"),
|
|
23
|
+
event("E1", "G1", "Pump A fails", 0.04),
|
|
24
|
+
event("E2", "G1", "Pump B fails", 0.05),
|
|
25
|
+
event("E3", "TOP", "Suction valve shut", 2e-3),
|
|
26
|
+
gate("G2", "TOP", "No power", "and"),
|
|
27
|
+
event("E4", "G2", "Mains supply lost", 0.02),
|
|
28
|
+
event("E5", "G2", "Generator fails to start", 0.06),
|
|
29
|
+
...seed % 2 ? [] : [event("E6", "TOP", "Strainer blocked", 4e-3)]
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
/** A gas-leak event tree: `{ id, parent, system, branch, probability, outcome }`. The first row is the leak and its frequency per year. */
|
|
33
|
+
static eventTree(seed) {
|
|
34
|
+
const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
|
|
35
|
+
const works = (base) => sig(Math.min(0.995, base + 0.04 * (u() - 0.5)), 3);
|
|
36
|
+
const pair = (id, parent, system, success, outcomes) => [
|
|
37
|
+
{ id: `${id}1`, parent, system, branch: "success", probability: success, outcome: outcomes[0] },
|
|
38
|
+
{ id: `${id}0`, parent, system, branch: "failure", probability: sig(1 - success, 3), outcome: outcomes[1] }
|
|
39
|
+
];
|
|
40
|
+
return [
|
|
41
|
+
{ id: "IE", parent: null, system: "Gas leak", branch: null, probability: sig(0.05 + 0.1 * u()), outcome: null },
|
|
42
|
+
...pair("D", "IE", "Detection", works(0.95), [null, null]),
|
|
43
|
+
...pair("S", "D1", "Isolation", works(0.9), ["Safe shutdown", null]),
|
|
44
|
+
...pair("N", "S0", "No ignition", works(0.8), ["Gas cloud", "Jet fire"]),
|
|
45
|
+
...pair("M", "D0", "No ignition", works(0.7), ["Gas cloud", "Explosion"])
|
|
46
|
+
];
|
|
47
|
+
}
|
|
48
|
+
/** A loss-of-containment bow-tie: `{ side, path, barrier }`, one row per barrier, plus the event and hazard rows. */
|
|
49
|
+
static bowTie(seed) {
|
|
50
|
+
const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
|
|
51
|
+
const lanes = (side, list) => list.flatMap(([path, barriers]) => barriers.slice(0, 1 + Math.floor(u() * barriers.length)).map((barrier) => ({ side, path, barrier })));
|
|
52
|
+
return [
|
|
53
|
+
{ side: "hazard", path: "LPG storage", barrier: null },
|
|
54
|
+
{ side: "event", path: "Loss of containment", barrier: null },
|
|
55
|
+
...lanes("threat", [["Corrosion", ["Coating", "Inspection"]], ["Overpressure", ["Relief valve", "Pressure trip"]], ["Vehicle impact", ["Crash barrier"]], ["Operator error", ["Procedure", "Interlock"]]]),
|
|
56
|
+
...lanes("consequence", [["Fire", ["Gas detection", "Deluge"]], ["Explosion", ["Ignition control", "Blast wall"]], ["Injury", ["Evacuation"]], ["Spill to ground", ["Bund"]]])
|
|
57
|
+
];
|
|
58
|
+
}
|
|
59
|
+
/** A pumping system as stages in series: `{ block, stage, branch, reliability }`. Blocks sharing a stage are redundant unless they share a branch. */
|
|
60
|
+
static blocks(seed) {
|
|
61
|
+
const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
|
|
62
|
+
const r = (base) => sig(1 - (1 - base) * (0.5 + u()), 3);
|
|
63
|
+
return [
|
|
64
|
+
{ block: "Supply", stage: "Power", branch: null, reliability: r(0.995) },
|
|
65
|
+
{ block: "Pump A", stage: "Pumping", branch: "A", reliability: r(0.93) },
|
|
66
|
+
{ block: "Pump B", stage: "Pumping", branch: "B", reliability: r(0.93) },
|
|
67
|
+
...seed % 2 ? [] : [{ block: "Pump C", stage: "Pumping", branch: "C", reliability: r(0.9) }],
|
|
68
|
+
{ block: "PLC", stage: "Control", branch: null, reliability: r(0.99) },
|
|
69
|
+
{ block: "Valve 1", stage: "Delivery", branch: "Line 1", reliability: r(0.97) },
|
|
70
|
+
{ block: "Filter", stage: "Delivery", branch: "Line 1", reliability: r(0.98) },
|
|
71
|
+
{ block: "Valve 2", stage: "Delivery", branch: "Line 2", reliability: r(0.95) }
|
|
72
|
+
];
|
|
73
|
+
}
|
|
74
|
+
/** 4,096 samples of a rate gyro at rest, 100 Hz: `{ time, rate }` in seconds and °/s, made of white noise, a flicker floor and a slow random walk. */
|
|
75
|
+
static gyro(seed) {
|
|
76
|
+
const { n: n2 } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
|
|
77
|
+
const white = 0.02, flicker = 35e-4, walk = 5e-4;
|
|
78
|
+
const poles = [4, 16, 64, 256, 1024].map((samples) => Math.exp(-1 / samples)), states = poles.map(() => 0);
|
|
79
|
+
let wander = 0;
|
|
80
|
+
return Array.from({ length: 4096 }, (_, i) => {
|
|
81
|
+
poles.forEach((pole, k) => {
|
|
82
|
+
states[k] = pole * states[k] + Math.sqrt(1 - pole * pole) * n2();
|
|
83
|
+
});
|
|
84
|
+
wander += walk * n2();
|
|
85
|
+
return { time: +(i * 0.01).toFixed(2), rate: +(white * n2() + flicker * states.reduce((sum, value) => sum + value, 0) + wander).toFixed(5) };
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/** A supply voltage against clock frequency sweep of one device: `{ voltage, frequency, pass }` in volts and GHz, with one stray failure inside the passing region. */
|
|
89
|
+
static shmoo(seed) {
|
|
90
|
+
const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
|
|
91
|
+
const knee = 0.6 + 0.06 * u(), gain = 3.3 + 0.5 * u(), hole = [3 + Math.floor(u() * 5), 1 + Math.floor(u() * 3)];
|
|
92
|
+
return Array.from({ length: 11 }, (_, i) => Array.from({ length: 10 }, (_2, j) => {
|
|
93
|
+
const voltage = +(0.8 + i * 0.04).toFixed(2), frequency = +(1 + j * 0.2).toFixed(1);
|
|
94
|
+
const limit = gain * Math.max(0, voltage - knee) ** 0.75 * (1 + 0.04 * (u() - 0.5));
|
|
95
|
+
return { voltage, frequency, pass: frequency <= limit && !(i === hole[0] + 3 && j === hole[1]) ? 1 : 0 };
|
|
96
|
+
})).flat();
|
|
97
|
+
}
|
|
98
|
+
/** Probe results for one wafer: `{ x, y, bin, value }` with die indices from 1, a test bin, and threshold voltage in volts. Yield falls toward the edge and around one defect cluster. */
|
|
99
|
+
static wafer(seed) {
|
|
100
|
+
const { u, n: n2 } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
|
|
101
|
+
const across = 19, centre = (across + 1) / 2, radius = across / 2;
|
|
102
|
+
const angle = u() * 2 * Math.PI, spot = [centre + Math.cos(angle) * radius * 0.5, centre + Math.sin(angle) * radius * 0.5], tilt = (u() - 0.5) * 4e-3;
|
|
103
|
+
const rows = [];
|
|
104
|
+
for (let y = 1; y <= across; y++) for (let x = 1; x <= across; x++) {
|
|
105
|
+
const reach = Math.hypot(Math.abs(x - centre) + 0.5, Math.abs(y - centre) + 0.5) / radius;
|
|
106
|
+
if (reach > 1) continue;
|
|
107
|
+
const near = Math.hypot(x - spot[0], y - spot[1]), draw = u();
|
|
108
|
+
const bin = near < 1.8 && draw < 0.8 ? "Short" : draw < 0.03 + 0.4 * reach ** 5 ? u() < 0.6 ? "Leakage" : "Open" : draw > 0.975 ? "Slow" : "Pass";
|
|
109
|
+
rows.push({ x, y, bin, value: +(0.45 + 0.035 * reach * reach + tilt * (x - centre) + 6e-3 * n2()).toFixed(4) });
|
|
110
|
+
}
|
|
111
|
+
return rows;
|
|
112
|
+
}
|
|
113
|
+
/** A bathtub scan of a serial receiver: `{ position, ber }` across one unit interval, from a dual-Dirac jitter model, measured down to 1e-10. */
|
|
114
|
+
static jitterScan(seed) {
|
|
115
|
+
const { u, n: n2 } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
|
|
116
|
+
const sigma = 0.018 + 8e-3 * u(), spread = 0.1 + 0.06 * u();
|
|
117
|
+
const wall = (x) => 0.25 * (_chunkAL4XQZH6cjs.StatMath.normalCdf(-(x - spread / 2) / sigma) + _chunkAL4XQZH6cjs.StatMath.normalCdf(-(x + spread / 2) / sigma));
|
|
118
|
+
return Array.from({ length: 41 }, (_, i) => i / 40).flatMap((position) => {
|
|
119
|
+
const ber = (wall(position) + wall(1 - position)) * Math.exp(0.2 * n2());
|
|
120
|
+
return ber < 1e-10 ? [] : [{ position: +position.toFixed(3), ber: +Math.min(0.5, ber).toExponential(3) }];
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/** A feed and reaction unit: equipment and instruments as `nodes` (`{ id, kind, label }`), process and signal lines as `links` (`{ source, target, line }`). */
|
|
124
|
+
static processUnit(seed) {
|
|
125
|
+
const unit = 100 * (1 + seed % 4), tag = (letters, offset = 1) => `${letters}-${unit + offset}`;
|
|
126
|
+
const spare = seed % 2 === 1;
|
|
127
|
+
const nodes = [
|
|
128
|
+
{ id: "tank", kind: "tank", label: tag("T") },
|
|
129
|
+
{ id: "pumpA", kind: "pump", label: `${tag("P")}A` },
|
|
130
|
+
...spare ? [{ id: "pumpB", kind: "pump", label: `${tag("P")}B` }] : [],
|
|
131
|
+
{ id: "fv", kind: "control-valve", label: tag("FV") },
|
|
132
|
+
{ id: "heater", kind: "exchanger", label: tag("E") },
|
|
133
|
+
{ id: "reactor", kind: "vessel", label: tag("R") },
|
|
134
|
+
{ id: "outlet", kind: "valve", label: tag("HV", 2) },
|
|
135
|
+
{ id: "ft", kind: "instrument", label: tag("FT") },
|
|
136
|
+
{ id: "fic", kind: "instrument", label: tag("FIC") },
|
|
137
|
+
{ id: "tt", kind: "instrument", label: tag("TT", 2) },
|
|
138
|
+
{ id: "tic", kind: "instrument", label: tag("TIC", 2) }
|
|
139
|
+
];
|
|
140
|
+
const pipe = (source, target) => ({ source, target, line: "process" }), wire = (source, target) => ({ source, target, line: "signal" });
|
|
141
|
+
const links = [
|
|
142
|
+
pipe("tank", "pumpA"),
|
|
143
|
+
pipe("pumpA", "fv"),
|
|
144
|
+
...spare ? [pipe("tank", "pumpB"), pipe("pumpB", "fv")] : [],
|
|
145
|
+
pipe("fv", "heater"),
|
|
146
|
+
pipe("heater", "reactor"),
|
|
147
|
+
pipe("reactor", "outlet"),
|
|
148
|
+
pipe("reactor", "tank"),
|
|
149
|
+
wire("pumpA", "ft"),
|
|
150
|
+
wire("ft", "fic"),
|
|
151
|
+
wire("fic", "fv"),
|
|
152
|
+
wire("reactor", "tt"),
|
|
153
|
+
wire("tt", "tic"),
|
|
154
|
+
wire("tic", "heater")
|
|
155
|
+
];
|
|
156
|
+
return { nodes, links };
|
|
157
|
+
}
|
|
158
|
+
/** A small plant network: `{ id, kind, from, label, rating, voltage }`, fed from a grid infeed through one transformer to a bus with four feeders. */
|
|
159
|
+
static powerNetwork(seed) {
|
|
160
|
+
const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
|
|
161
|
+
const pick = (list) => list[Math.floor(u() * list.length)];
|
|
162
|
+
const high = "33 kV", medium = "11 kV";
|
|
163
|
+
return [
|
|
164
|
+
{ id: "GRID", kind: "source", from: null, label: "Grid", rating: `${pick([500, 750, 1e3])} MVA`, voltage: high },
|
|
165
|
+
{ id: "CB1", kind: "breaker", from: "GRID", label: "CB1", rating: "1250 A", voltage: high },
|
|
166
|
+
{ id: "T1", kind: "transformer", from: "CB1", label: "T1", rating: `${pick([10, 16, 20])} MVA`, voltage: medium },
|
|
167
|
+
{ id: "BUS", kind: "bus", from: "T1", label: "Main bus", rating: null, voltage: medium },
|
|
168
|
+
{ id: "CB2", kind: "breaker", from: "BUS", label: "CB2", rating: "630 A", voltage: medium },
|
|
169
|
+
{ id: "M1", kind: "motor", from: "CB2", label: "Pump M1", rating: `${pick([0.8, 1.2, 1.6])} MW`, voltage: medium },
|
|
170
|
+
{ id: "CB3", kind: "breaker", from: "BUS", label: "CB3", rating: "630 A", voltage: medium },
|
|
171
|
+
{ id: "G1", kind: "generator", from: "CB3", label: "Standby", rating: `${pick([2, 2.5, 3])} MVA`, voltage: medium },
|
|
172
|
+
{ id: "Q1", kind: "switch", from: "BUS", label: "Q1", rating: "400 A", voltage: medium },
|
|
173
|
+
{ id: "L1", kind: "load", from: "Q1", label: "Process", rating: `${pick([1.5, 2, 2.4])} MW`, voltage: medium },
|
|
174
|
+
{ id: "F1", kind: "fuse", from: "BUS", label: "F1", rating: "63 A", voltage: medium },
|
|
175
|
+
{ id: "L2", kind: "load", from: "F1", label: "Lighting", rating: `${pick([120, 160, 200])} kW`, voltage: medium }
|
|
176
|
+
];
|
|
177
|
+
}
|
|
178
|
+
/** A motor starter in ladder logic: `{ rung, step, kind, tag, state, preset, comment }`. The seed sets which inputs are on. */
|
|
179
|
+
static ladder(seed) {
|
|
180
|
+
const running = seed % 3 !== 0 ? 1 : 0, timed = seed % 2 === 0 && running ? 1 : 0;
|
|
181
|
+
const contact = (rung, step, kind, tag, state, comment = null) => ({ rung, step, kind, tag, state, preset: null, comment });
|
|
182
|
+
return [
|
|
183
|
+
contact(1, 1, "nc", "Stop", 0, "Motor start and stop with seal-in"),
|
|
184
|
+
contact(1, 2, "no", "Start", 0),
|
|
185
|
+
contact(1, 2, "no", "M1", running),
|
|
186
|
+
contact(1, 3, "nc", "OL1", 0),
|
|
187
|
+
{ rung: 1, step: 4, kind: "coil", tag: "M1", state: null, preset: null, comment: null },
|
|
188
|
+
contact(2, 1, "no", "M1", running, "Run-up delay"),
|
|
189
|
+
{ rung: 2, step: 2, kind: "timer", tag: "T1", state: null, preset: `${3 + seed % 4} s`, comment: null },
|
|
190
|
+
contact(3, 1, "no", "T1", timed, "Open discharge valve"),
|
|
191
|
+
contact(3, 2, "nc", "LSH", 0),
|
|
192
|
+
{ rung: 3, step: 3, kind: "coil", tag: "V1", state: null, preset: null, comment: null }
|
|
193
|
+
];
|
|
194
|
+
}
|
|
195
|
+
/** A single feedback loop with a disturbance: `nodes` (`{ id, kind, label }`) and `links` (`{ source, target, sign }`). */
|
|
196
|
+
static controlLoop(seed) {
|
|
197
|
+
const { u } = _chunkLNWTC72Ycjs.SampleData.rng(seed);
|
|
198
|
+
const whole = (low, high) => low + Math.floor(u() * (high - low + 1));
|
|
199
|
+
const nodes = [
|
|
200
|
+
{ id: "r", kind: "input", label: "R(s)" },
|
|
201
|
+
{ id: "e", kind: "sum", label: "" },
|
|
202
|
+
{ id: "c", kind: "block", label: `${whole(2, 9)}(s+${whole(1, 4)})/s` },
|
|
203
|
+
{ id: "u", kind: "sum", label: "" },
|
|
204
|
+
{ id: "g", kind: "block", label: `${whole(1, 6)}/(s+${whole(2, 9)})` },
|
|
205
|
+
{ id: "y", kind: "output", label: "Y(s)" },
|
|
206
|
+
{ id: "h", kind: "block", label: `1/(0.${whole(1, 5)}s+1)` },
|
|
207
|
+
{ id: "d", kind: "input", label: "D(s)" }
|
|
208
|
+
];
|
|
209
|
+
const link = (source, target, sign = null) => ({ source, target, sign });
|
|
210
|
+
return { nodes, links: [link("r", "e", "+"), link("e", "c"), link("c", "u", "+"), link("d", "u", "+"), link("u", "g"), link("g", "y"), link("g", "h"), link("h", "e", "-")] };
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
// src/charts/reliabilitycharts/SchematicChart.ts
|
|
215
|
+
var SchematicChart = class extends _chunkEEF5WRRZcjs.Chart2D {
|
|
216
|
+
plotMargin() {
|
|
217
|
+
return { top: 8, right: 12, bottom: 8, left: 12 };
|
|
218
|
+
}
|
|
219
|
+
rows() {
|
|
220
|
+
const { data } = this.options;
|
|
221
|
+
return (Array.isArray(data) ? data : []).filter((row) => row !== null && typeof row === "object");
|
|
222
|
+
}
|
|
223
|
+
static word(cell) {
|
|
224
|
+
return cell === null || cell === void 0 ? "" : String(cell).trim();
|
|
225
|
+
}
|
|
226
|
+
static number(cell) {
|
|
227
|
+
if (cell === null || cell === void 0 || cell === "" || typeof cell === "boolean") return null;
|
|
228
|
+
const value = +cell;
|
|
229
|
+
return Number.isFinite(value) ? value : null;
|
|
230
|
+
}
|
|
231
|
+
/** A filled triangle with its tip at `x, y`, pointing along `angle` in degrees (0 is right, 90 is down). */
|
|
232
|
+
static arrow(x, y, angle, size = 7) {
|
|
233
|
+
const turn = angle * Math.PI / 180, cos = Math.cos(turn), sin = Math.sin(turn), half = size * 0.45;
|
|
234
|
+
const at = (along, across) => `${+(x + along * cos - across * sin).toFixed(2)},${+(y + along * sin + across * cos).toFixed(2)}`;
|
|
235
|
+
return `M${at(0, 0)} L${at(-size, -half)} L${at(-size, half)} Z`;
|
|
236
|
+
}
|
|
237
|
+
wires(ctx, name, wires) {
|
|
238
|
+
const paths = ctx.marks(name, "path", wires, (wire) => wire.key).attr("fill", "none").attr("stroke", (wire) => _nullishCoalesce(wire.color, () => ( ctx.theme.inkSecondary))).attr("stroke-width", (wire) => _nullishCoalesce(wire.width, () => ( 1.5))).attr("stroke-dasharray", (wire) => _nullishCoalesce(wire.dash, () => ( null))).attr("stroke-linejoin", "round").attr("stroke-linecap", "round");
|
|
239
|
+
ctx.set(paths, { d: (wire) => wire.d });
|
|
240
|
+
paths.style("pointer-events", (wire) => wire.tip ? null : "none");
|
|
241
|
+
ctx.hover(paths.filter((wire) => !!wire.tip), (wire) => wire.tip);
|
|
242
|
+
return paths;
|
|
243
|
+
}
|
|
244
|
+
notes(ctx, name, notes) {
|
|
245
|
+
const fills = { ink: ctx.theme.ink, secondary: ctx.theme.inkSecondary, muted: ctx.theme.inkMuted };
|
|
246
|
+
const marks = ctx.marks(name, "text", notes, (note) => note.key).attr("text-anchor", (note) => _nullishCoalesce(note.anchor, () => ( "middle"))).attr("dominant-baseline", "central").attr("font-size", (note) => _nullishCoalesce(note.size, () => ( 10))).attr("font-weight", (note) => _nullishCoalesce(note.weight, () => ( null))).attr("font-family", ctx.theme.fontFamily).attr("fill", (note) => _nullishCoalesce(note.fill, () => ( fills[_nullishCoalesce(note.tone, () => ( "ink"))]))).attr("stroke", (note) => note.halo ? ctx.theme.surface : null).attr("stroke-width", (note) => note.halo ? 3 : null).attr("paint-order", (note) => note.halo ? "stroke" : null).style("pointer-events", "none").text((note) => note.text);
|
|
247
|
+
ctx.set(marks, { x: (note) => note.x, y: (note) => note.y });
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
// src/charts/reliabilitycharts/SchematicLabel.ts
|
|
252
|
+
var EM = 0.565;
|
|
253
|
+
var SchematicLabel = class _SchematicLabel {
|
|
254
|
+
static width(text, size = 10) {
|
|
255
|
+
return text.length * size * EM;
|
|
256
|
+
}
|
|
257
|
+
/** `text` cut to `room` px with an ellipsis, or nothing when under two characters would show. */
|
|
258
|
+
static fit(text, room, size = 10) {
|
|
259
|
+
if (_SchematicLabel.width(text, size) <= room) return text;
|
|
260
|
+
const keep = Math.floor(room / (size * EM)) - 1;
|
|
261
|
+
return keep >= 2 ? `${text.slice(0, keep).trimEnd()}\u2026` : "";
|
|
262
|
+
}
|
|
263
|
+
/** Up to `lines` lines broken at spaces, the last one cut to fit. */
|
|
264
|
+
static wrap(text, room, lines, size = 10) {
|
|
265
|
+
const out = [];
|
|
266
|
+
let rest = text.trim();
|
|
267
|
+
while (rest && out.length < lines) {
|
|
268
|
+
const cut = rest.lastIndexOf(" ", Math.floor(room / (size * EM)));
|
|
269
|
+
if (out.length === lines - 1 || _SchematicLabel.width(rest, size) <= room || cut <= 0) {
|
|
270
|
+
out.push(_SchematicLabel.fit(rest, room, size));
|
|
271
|
+
break;
|
|
272
|
+
}
|
|
273
|
+
out.push(rest.slice(0, cut));
|
|
274
|
+
rest = rest.slice(cut + 1);
|
|
275
|
+
}
|
|
276
|
+
return out.filter(Boolean);
|
|
277
|
+
}
|
|
278
|
+
/** A probability, rate or reliability in few characters: 0.95, 0.0125, 2.5e-5, and 0.99962 with every nine kept. */
|
|
279
|
+
static probability(value) {
|
|
280
|
+
if (value === null || !Number.isFinite(value)) return "?";
|
|
281
|
+
if (value === 0) return "0";
|
|
282
|
+
if (value > 0.99 && value < 1) return value.toFixed(Math.min(8, Math.ceil(-Math.log10(1 - value)) + 1));
|
|
283
|
+
return Math.abs(value) < 1e-3 ? value.toExponential(1) : `${+value.toPrecision(3)}`;
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
// src/charts/reliabilitycharts/WaferMap.ts
|
|
288
|
+
var WaferMapEncoding = /* @__PURE__ */ ((WaferMapEncoding2) => {
|
|
289
|
+
WaferMapEncoding2["Bin"] = "bin";
|
|
290
|
+
WaferMapEncoding2["Value"] = "value";
|
|
291
|
+
return WaferMapEncoding2;
|
|
292
|
+
})(WaferMapEncoding || {});
|
|
293
|
+
var WaferMapMark = /* @__PURE__ */ ((WaferMapMark2) => {
|
|
294
|
+
WaferMapMark2["Notch"] = "notch";
|
|
295
|
+
WaferMapMark2["Flat"] = "flat";
|
|
296
|
+
return WaferMapMark2;
|
|
297
|
+
})(WaferMapMark || {});
|
|
298
|
+
var ZONES = ["Centre", "Middle", "Edge"];
|
|
299
|
+
var n = (value) => +value.toFixed(2);
|
|
300
|
+
var percent = (good, total) => total ? `${(100 * good / total).toFixed(1)}%` : "n/a";
|
|
301
|
+
var WaferMap = (_class = class _WaferMap extends SchematicChart {
|
|
302
|
+
static __initStatic() {this.meta = {
|
|
303
|
+
id: "wafer-map",
|
|
304
|
+
name: "Wafer map",
|
|
305
|
+
family: "matrix" /* Matrix */,
|
|
306
|
+
dimension: 2 /* Two */,
|
|
307
|
+
shape: "table" /* Table */,
|
|
308
|
+
description: "Draws the dies of a semiconductor wafer in place, coloured by test bin or a measured value, with the notch or flat and the yield overall and by ring. The sample wafer is invented.",
|
|
309
|
+
tags: ["wafer", "semiconductor", "die", "yield", "bin map", "probe", "defect"],
|
|
310
|
+
sample: (seed) => ReliabilitySamples.wafer(seed),
|
|
311
|
+
variants: {
|
|
312
|
+
encoding: Object.values(WaferMapEncoding),
|
|
313
|
+
mark: Object.values(WaferMapMark),
|
|
314
|
+
zones: [false, true]
|
|
315
|
+
}
|
|
316
|
+
}}
|
|
317
|
+
defaults() {
|
|
318
|
+
return { x: "x", y: "y", bin: "bin", value: "value", passBin: "Pass", encoding: "bin" /* Bin */, mark: "notch" /* Notch */, zones: false };
|
|
319
|
+
}
|
|
320
|
+
/** The value ramp has its own key beside the wafer. */
|
|
321
|
+
legendItems() {
|
|
322
|
+
return this.options.encoding === "value" /* Value */ ? [] : super.legendItems();
|
|
323
|
+
}
|
|
324
|
+
/** Dies, wafer radius and yield. A position given twice keeps its first row. */
|
|
325
|
+
summary() {
|
|
326
|
+
const { x, y, bin, value, passBin } = this.options;
|
|
327
|
+
const seen = /* @__PURE__ */ new Map();
|
|
328
|
+
for (const row of this.rows()) {
|
|
329
|
+
const column = SchematicChart.number(row[x]), line = SchematicChart.number(row[y]);
|
|
330
|
+
if (column === null || line === null || seen.has(`${column}/${line}`)) continue;
|
|
331
|
+
seen.set(`${column}/${line}`, { x: column, y: line, bin: SchematicChart.word(row[bin]), value: SchematicChart.number(row[value]), reach: 0 });
|
|
332
|
+
}
|
|
333
|
+
const dies = [...seen.values()], xs = dies.map((die) => die.x), ys = dies.map((die) => die.y);
|
|
334
|
+
const centre = dies.length ? [(Math.min(...xs) + Math.max(...xs)) / 2, (Math.min(...ys) + Math.max(...ys)) / 2] : [0, 0];
|
|
335
|
+
const radius = Math.max(0.5, ...dies.map((die) => Math.hypot(Math.abs(die.x - centre[0]) + 0.5, Math.abs(die.y - centre[1]) + 0.5)));
|
|
336
|
+
const zones = ZONES.map((name) => ({ name, good: 0, total: 0 }));
|
|
337
|
+
let good = 0;
|
|
338
|
+
for (const die of dies) {
|
|
339
|
+
die.reach = Math.hypot(die.x - centre[0], die.y - centre[1]) / radius;
|
|
340
|
+
const zone = zones[Math.min(2, Math.floor(die.reach * 3))], pass = die.bin === passBin;
|
|
341
|
+
zone.total++;
|
|
342
|
+
if (pass) {
|
|
343
|
+
zone.good++;
|
|
344
|
+
good++;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
return { dies, centre, radius, good, zones };
|
|
348
|
+
}
|
|
349
|
+
/** The wafer's edge around the origin: a V notch, or a flat no higher than `floor`, the lowest die edge. */
|
|
350
|
+
static outline(radius, mark, floor = 0) {
|
|
351
|
+
if (mark === "flat" /* Flat */) {
|
|
352
|
+
const chord = Math.min(radius * 0.995, Math.max(radius * 0.93, floor + 1)), half2 = Math.sqrt(radius * radius - chord * chord);
|
|
353
|
+
return `M${n(half2)},${n(chord)} A${n(radius)},${n(radius)} 0 1 0 ${n(-half2)},${n(chord)} Z`;
|
|
354
|
+
}
|
|
355
|
+
const depth = Math.max(4, radius * 0.05), half = depth * 0.8, drop = Math.sqrt(radius * radius - half * half);
|
|
356
|
+
return `M${n(half)},${n(drop)} A${n(radius)},${n(radius)} 0 1 0 ${n(-half)},${n(drop)} L0,${n(radius - depth)} Z`;
|
|
357
|
+
}
|
|
358
|
+
draw(ctx) {
|
|
359
|
+
const { width, height } = ctx.plot, { encoding, mark, zones, value, bin } = this.options, { theme, palette } = ctx;
|
|
360
|
+
const { dies, centre, radius, good, zones: rings } = this.summary();
|
|
361
|
+
const panel = Math.max(84, Math.min(150, width * 0.3)), side = Math.max(20, Math.min(height, width - panel - 10));
|
|
362
|
+
const reach = side / 2 - 2, pitch = reach / radius, wx = side / 2, wy = height / 2;
|
|
363
|
+
const byValue = encoding === "value" /* Value */;
|
|
364
|
+
const values = dies.map((die) => die.value).filter((v) => v !== null);
|
|
365
|
+
const low = Math.min(...values), span = Math.max(...values) - low || 1;
|
|
366
|
+
const counts = /* @__PURE__ */ new Map();
|
|
367
|
+
for (const die of dies) counts.set(die.bin, (_nullishCoalesce(counts.get(die.bin), () => ( 0))) + 1);
|
|
368
|
+
if (!byValue) [...counts].sort((a, b) => b[1] - a[1]).forEach(([name]) => palette.color(name || "Unbinned"));
|
|
369
|
+
const color = (die) => byValue ? die.value === null ? theme.grid : palette.sequential((die.value - low) / span) : palette.color(die.bin || "Unbinned");
|
|
370
|
+
const gap = pitch >= 9 ? 1 : pitch >= 5 ? 0.5 : 0;
|
|
371
|
+
const cells = ctx.marks("cells", "rect", dies, (die) => `${die.x}/${die.y}`).attr("fill", color).attr("rx", pitch >= 9 ? 1.5 : 0);
|
|
372
|
+
ctx.set(cells, { x: (die) => wx + (die.x - centre[0] - 0.5) * pitch + gap, y: (die) => wy + (die.y - centre[1] - 0.5) * pitch + gap, width: Math.max(0.5, pitch - 2 * gap), height: Math.max(0.5, pitch - 2 * gap) });
|
|
373
|
+
ctx.hover(cells, (die) => ({
|
|
374
|
+
title: `Die ${die.x}, ${die.y}`,
|
|
375
|
+
color: color(die),
|
|
376
|
+
rows: [[bin, die.bin || "n/a"], ...die.value === null ? [] : [[value, +die.value.toPrecision(4)]], ["Ring", ZONES[Math.min(2, Math.floor(die.reach * 3))]]]
|
|
377
|
+
}));
|
|
378
|
+
const floor = Math.max(0, ...dies.map((die) => (die.y - centre[1] + 0.5) * pitch));
|
|
379
|
+
const edge = ctx.marks("axis-wafer", "path", dies.length ? [_WaferMap.outline(reach, mark, floor)] : []).attr("fill", "none").attr("stroke", theme.axis).attr("stroke-width", 1.5).attr("transform", `translate(${n(wx)},${n(wy)})`);
|
|
380
|
+
ctx.set(edge, { d: (d) => d });
|
|
381
|
+
const circles = ctx.marks("rings", "circle", zones && dies.length ? [1 / 3, 2 / 3] : []).attr("fill", "none").attr("stroke", theme.ink).attr("stroke-width", 1.5).attr("stroke-dasharray", "4 3");
|
|
382
|
+
ctx.set(circles, { cx: wx, cy: wy, r: (share) => share * reach });
|
|
383
|
+
circles.style("pointer-events", "none");
|
|
384
|
+
const left = side + 12, room = width - left, notes = [];
|
|
385
|
+
let y = Math.max(8, height / 2 - (60 + (zones ? 62 : 0) + (byValue ? 44 : 0)) / 2);
|
|
386
|
+
if (dies.length) {
|
|
387
|
+
notes.push(
|
|
388
|
+
{ key: "yield/title", text: "Yield", x: left, y: y + 6, anchor: "start", tone: "secondary" },
|
|
389
|
+
{ key: "yield/value", text: percent(good, dies.length), x: left, y: y + 26, anchor: "start", size: Math.min(22, room / 3.6), weight: 600 },
|
|
390
|
+
{ key: "yield/count", text: SchematicLabel.fit(`${good} of ${dies.length} dies`, room), x: left, y: y + 46, anchor: "start", tone: "secondary" }
|
|
391
|
+
);
|
|
392
|
+
y += 66;
|
|
393
|
+
if (zones) {
|
|
394
|
+
rings.forEach((ring, i) => notes.push(
|
|
395
|
+
{ key: `zone/${ring.name}`, text: ring.name, x: left, y: y + 6 + i * 16, anchor: "start", tone: "secondary" },
|
|
396
|
+
{ key: `zone/${ring.name}/value`, text: percent(ring.good, ring.total), x: left + Math.min(room, 96), y: y + 6 + i * 16, anchor: "end", weight: 600 }
|
|
397
|
+
));
|
|
398
|
+
y += 62;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
const steps = byValue && values.length ? Array.from({ length: 24 }, (_, i) => i) : [], keyWidth = Math.min(room, 110);
|
|
402
|
+
const ramp = ctx.marks("size-key", "rect", steps, (i) => i).attr("fill", (i) => palette.sequential(i / 23));
|
|
403
|
+
ctx.set(ramp, { x: (i) => left + i * keyWidth / 24, y: y + 14, width: keyWidth / 24 + 0.5, height: 8 });
|
|
404
|
+
if (steps.length) {
|
|
405
|
+
notes.push(
|
|
406
|
+
{ key: "key/title", text: SchematicLabel.fit(value, room), x: left, y: y + 5, anchor: "start", tone: "secondary" },
|
|
407
|
+
{ key: "key/low", text: `${+low.toPrecision(3)}`, x: left, y: y + 31, anchor: "start", size: 9, tone: "secondary" },
|
|
408
|
+
{ key: "key/high", text: `${+(low + span).toPrecision(3)}`, x: left + keyWidth, y: y + 31, anchor: "end", size: 9, tone: "secondary" }
|
|
409
|
+
);
|
|
410
|
+
}
|
|
411
|
+
this.notes(ctx, "labels", notes);
|
|
412
|
+
}
|
|
413
|
+
}, _class.__initStatic(), _class);
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
exports.ReliabilitySamples = ReliabilitySamples; exports.SchematicChart = SchematicChart; exports.SchematicLabel = SchematicLabel; exports.WaferMapEncoding = WaferMapEncoding; exports.WaferMapMark = WaferMapMark; exports.WaferMap = WaferMap;
|
|
@@ -4,7 +4,7 @@ var _chunk6KYVL5HYcjs = require('./chunk-6KYVL5HY.cjs');
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkLNWTC72Ycjs = require('./chunk-LNWTC72Y.cjs');
|
|
8
8
|
|
|
9
9
|
// src/charts/threeglobe/GlobeEnums.ts
|
|
10
10
|
var GlobeSurface = /* @__PURE__ */ ((GlobeSurface2) => {
|
|
@@ -234,7 +234,7 @@ var finite = (value, fallback = 0) => {
|
|
|
234
234
|
var GlobeSamples = class {
|
|
235
235
|
/** `{ name, lon, lat, value, group }`: points clustered around cities. */
|
|
236
236
|
static scatter(seed, count = 320) {
|
|
237
|
-
const cities =
|
|
237
|
+
const cities = _chunkLNWTC72Ycjs.SampleData.cities(seed), points = _chunkLNWTC72Ycjs.SampleData.points(seed, count, 3);
|
|
238
238
|
return points.map((point, i) => {
|
|
239
239
|
const city = cities[(i * 7 + Math.floor(+point.size)) % cities.length], spread = 3 + +city.value / 100 * 9;
|
|
240
240
|
return {
|
|
@@ -248,7 +248,7 @@ var GlobeSamples = class {
|
|
|
248
248
|
}
|
|
249
249
|
/** `{ from, to, fromLon, fromLat, toLon, toLat, value }`: routes out of the three biggest hubs. */
|
|
250
250
|
static routes(seed) {
|
|
251
|
-
const cities =
|
|
251
|
+
const cities = _chunkLNWTC72Ycjs.SampleData.cities(seed), hubs = [...cities].sort((a, b) => +b.value - +a.value).slice(0, 3);
|
|
252
252
|
return cities.flatMap((city, i) => hubs.filter((hub, h) => hub !== city && (i + h) % 2 === 0).map((hub) => ({
|
|
253
253
|
from: hub.name,
|
|
254
254
|
to: city.name,
|
|
@@ -261,7 +261,7 @@ var GlobeSamples = class {
|
|
|
261
261
|
}
|
|
262
262
|
/** `{ track, lon, lat, time, value }`: wandering paths between cities. */
|
|
263
263
|
static tracks(seed, tracks = 5, steps = 30) {
|
|
264
|
-
const cities =
|
|
264
|
+
const cities = _chunkLNWTC72Ycjs.SampleData.cities(seed), walk = _chunkLNWTC72Ycjs.SampleData.timeSeries(seed, steps, 1);
|
|
265
265
|
return Array.from({ length: tracks }, (_, t) => {
|
|
266
266
|
const [a, b] = [cities[t * 3 % cities.length], cities[(t * 3 + 7) % cities.length]];
|
|
267
267
|
const span = (+b.lon - +a.lon + 540) % 360 - 180;
|
|
@@ -273,12 +273,12 @@ var GlobeSamples = class {
|
|
|
273
273
|
}
|
|
274
274
|
/** World regions with a second variable, `properties.share`. */
|
|
275
275
|
static regions(seed) {
|
|
276
|
-
const world2 =
|
|
276
|
+
const world2 = _chunkLNWTC72Ycjs.WorldSample.countries(seed), other = _chunkLNWTC72Ycjs.WorldSample.countries(seed + 1);
|
|
277
277
|
return { ...world2, features: world2.features.map((feature, i) => ({ ...feature, properties: { ...feature.properties, share: other.features[i].properties.value } })) };
|
|
278
278
|
}
|
|
279
279
|
/** A global potential: `x` is longitude, `y` latitude. */
|
|
280
280
|
static field(seed) {
|
|
281
|
-
const { z } =
|
|
281
|
+
const { z } = _chunkLNWTC72Ycjs.SampleData.surface(seed, 37);
|
|
282
282
|
const lons = Array.from({ length: 37 }, (_, i) => -180 + i * 10), lats = Array.from({ length: 37 }, (_, i) => -90 + i * 5);
|
|
283
283
|
return { x: lons, y: lats, z: z.map((row) => row.map((value, i) => value + 0.35 * Math.sin(i / 36 * Math.PI * 6))) };
|
|
284
284
|
}
|
|
@@ -822,7 +822,7 @@ var GlobeChart = class extends _chunk6KYVL5HYcjs.Chart3D {
|
|
|
822
822
|
this.draw(ctx);
|
|
823
823
|
}
|
|
824
824
|
get basemap() {
|
|
825
|
-
return (_nullishCoalesce(this.options.basemap, () => ( (world ??=
|
|
825
|
+
return (_nullishCoalesce(this.options.basemap, () => ( (world ??= _chunkLNWTC72Ycjs.WorldSample.countries(1))))).features;
|
|
826
826
|
}
|
|
827
827
|
get oceanColor() {
|
|
828
828
|
return this.theme.grid;
|
|
@@ -1127,7 +1127,7 @@ var Bubble3DMap = (_class8 = class extends SiteGlobeChart {
|
|
|
1127
1127
|
shape: "geo" /* Geo */,
|
|
1128
1128
|
description: "Stands spheres, domes, discs or columns on a projected map, with size honestly scaled to the value.",
|
|
1129
1129
|
tags: ["proportional symbol", "graduated symbol"],
|
|
1130
|
-
sample: (seed) =>
|
|
1130
|
+
sample: (seed) => _chunkLNWTC72Ycjs.SampleData.cities(seed),
|
|
1131
1131
|
variants: {
|
|
1132
1132
|
bubble: Object.values(GlobeBubble),
|
|
1133
1133
|
volumetric: [false, true],
|
|
@@ -1501,7 +1501,7 @@ var FlatProjectionPlane = (_class13 = class extends SiteGlobeChart {
|
|
|
1501
1501
|
shape: "geo" /* Geo */,
|
|
1502
1502
|
description: "Lays the world flat through a chosen projection, with optional Tissot circles exposing its distortion.",
|
|
1503
1503
|
tags: ["map projection", "tissot", "mollweide", "robinson", "interrupted"],
|
|
1504
|
-
sample: (seed) =>
|
|
1504
|
+
sample: (seed) => _chunkLNWTC72Ycjs.SampleData.cities(seed),
|
|
1505
1505
|
variants: {
|
|
1506
1506
|
projection: Object.values(GlobeProjection),
|
|
1507
1507
|
land: ["solid" /* Solid */, "dotted" /* Dotted */, "outline" /* Outline */],
|
|
@@ -1607,7 +1607,7 @@ var Globe3DChart = (_class15 = class extends SiteGlobeChart {
|
|
|
1607
1607
|
shape: "geo" /* Geo */,
|
|
1608
1608
|
description: "Shows named places on a lit, rotatable earth built from real country geometry.",
|
|
1609
1609
|
tags: ["earth", "world", "locator", "orthographic"],
|
|
1610
|
-
sample: (seed) =>
|
|
1610
|
+
sample: (seed) => _chunkLNWTC72Ycjs.SampleData.cities(seed),
|
|
1611
1611
|
variants: { land: Object.values(GlobeLand), graticule: [false, true], marker: Object.values(GlobeMarker), surface: Object.values(GlobeSurface) }
|
|
1612
1612
|
}}
|
|
1613
1613
|
defaults() {
|
|
@@ -2090,7 +2090,7 @@ var RingGlobe = (_class22 = class extends SiteGlobeChart {
|
|
|
2090
2090
|
shape: "geo" /* Geo */,
|
|
2091
2091
|
description: "Marks places with geodesic rings whose radius shows reach, or plots longitude profiles on an orbit.",
|
|
2092
2092
|
tags: ["ripple", "pulse", "range rings", "orbit", "buffer"],
|
|
2093
|
-
sample: (seed) =>
|
|
2093
|
+
sample: (seed) => _chunkLNWTC72Ycjs.SampleData.cities(seed),
|
|
2094
2094
|
variants: {
|
|
2095
2095
|
form: Object.values(GlobeRingForm),
|
|
2096
2096
|
rings: [3, 1, 5],
|
|
@@ -35,7 +35,7 @@ var _chunkSL46XHUKcjs = require('./chunk-SL46XHUK.cjs');
|
|
|
35
35
|
var _chunkEEF5WRRZcjs = require('./chunk-EEF5WRRZ.cjs');
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunkLNWTC72Ycjs = require('./chunk-LNWTC72Y.cjs');
|
|
39
39
|
|
|
40
40
|
// src/charts/hierarchy/PartitionChart.ts
|
|
41
41
|
var _d3 = require('d3');
|
|
@@ -324,10 +324,10 @@ var TreeSamples = class _TreeSamples {
|
|
|
324
324
|
/** First tree from `seed` on with at least three top-level branches, since two branches make weak examples. */
|
|
325
325
|
static broad(seed, depth = 3, breadth = 4) {
|
|
326
326
|
for (let next = seed; next < seed + 40; next++) {
|
|
327
|
-
const tree4 =
|
|
327
|
+
const tree4 = _chunkLNWTC72Ycjs.SampleData.tree(next, depth, breadth);
|
|
328
328
|
if ((_nullishCoalesce(_optionalChain([tree4, 'access', _11 => _11.children, 'optionalAccess', _12 => _12.length]), () => ( 0))) >= 3) return tree4;
|
|
329
329
|
}
|
|
330
|
-
return
|
|
330
|
+
return _chunkLNWTC72Ycjs.SampleData.tree(seed, depth, breadth);
|
|
331
331
|
}
|
|
332
332
|
/** Uneven depth: every third internal child collapses into one leaf holding its subtree's total. */
|
|
333
333
|
static uneven(seed, depth = 3, breadth = 4) {
|
|
@@ -18,13 +18,13 @@ var _chunkNEVHPFWRcjs = require('./chunk-NEVHPFWR.cjs');
|
|
|
18
18
|
var _chunkSRQSXNSPcjs = require('./chunk-SRQSXNSP.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var _chunkAL4XQZH6cjs = require('./chunk-AL4XQZH6.cjs');
|
|
22
21
|
|
|
23
22
|
|
|
24
23
|
|
|
24
|
+
var _chunkFJJFDFDHcjs = require('./chunk-FJJFDFDH.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkAL4XQZH6cjs = require('./chunk-AL4XQZH6.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
var _chunkXX2YTCORcjs = require('./chunk-XX2YTCOR.cjs');
|
|
@@ -36,7 +36,7 @@ var _chunkPY4R3IFFcjs = require('./chunk-PY4R3IFF.cjs');
|
|
|
36
36
|
var _chunk35CT4Q2Ecjs = require('./chunk-35CT4Q2E.cjs');
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
var
|
|
39
|
+
var _chunkLNWTC72Ycjs = require('./chunk-LNWTC72Y.cjs');
|
|
40
40
|
|
|
41
41
|
// src/charts/mlcharts/AttentionHeatmap.ts
|
|
42
42
|
var _d3 = require('d3');
|
|
@@ -214,7 +214,7 @@ var AttentionSamples = class _AttentionSamples {
|
|
|
214
214
|
/** Softmax over noisy logits, so each row is a true probability distribution. */
|
|
215
215
|
static crossAttention(seed = 1) {
|
|
216
216
|
const heads = HEADS.map(({ name, focus, spread }, h) => {
|
|
217
|
-
const { values } =
|
|
217
|
+
const { values } = _chunkLNWTC72Ycjs.SampleData.matrix(seed + h, TARGET.length, SOURCE.length);
|
|
218
218
|
return {
|
|
219
219
|
name,
|
|
220
220
|
weights: TARGET.map((_, t) => _AttentionSamples.softmax(SOURCE.map((_2, s) => -((s - focus(ALIGNED[t])) ** 2) / (2 * spread ** 2) + NOISE * values[t][s])))
|
|
@@ -485,7 +485,7 @@ var squared = (a, b) => (a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2;
|
|
|
485
485
|
var CurveDiagnosticSamples = class {
|
|
486
486
|
/** Standard normal draws from `SampleData`, since its generators are the only seeded source. */
|
|
487
487
|
static #normals(seed, count) {
|
|
488
|
-
const values =
|
|
488
|
+
const values = _chunkLNWTC72Ycjs.SampleData.distribution(seed, count, 1).map((row) => (row.value - 40) / 8);
|
|
489
489
|
let i = 0;
|
|
490
490
|
return () => values[i++ % values.length];
|
|
491
491
|
}
|
|
@@ -511,7 +511,7 @@ var CurveDiagnosticSamples = class {
|
|
|
511
511
|
}
|
|
512
512
|
/** `{ k, inertia, silhouette }` from running k-means and the silhouette on `SampleData.points`, which is itself synthetic. */
|
|
513
513
|
static clusterSweep(seed, most = 10) {
|
|
514
|
-
const points =
|
|
514
|
+
const points = _chunkLNWTC72Ycjs.SampleData.points(seed, 160, 4).map((row, i) => [row.x, row.y - 0.8 * row.x + i % 2 * 42]);
|
|
515
515
|
return Array.from({ length: most }, (_, i) => {
|
|
516
516
|
const k = i + 1, { labels, inertia } = this.#kMeans(points, k);
|
|
517
517
|
return { k, inertia: +inertia.toFixed(1), silhouette: k > 1 ? +this.#silhouette(points, labels, k).toFixed(4) : null };
|
|
@@ -1164,7 +1164,7 @@ var DecisionSamples = class {
|
|
|
1164
1164
|
}
|
|
1165
1165
|
/** Three overlapping clusters with that classifier's probabilities evaluated onto a grid. */
|
|
1166
1166
|
static clusters(seed) {
|
|
1167
|
-
const points =
|
|
1167
|
+
const points = _chunkLNWTC72Ycjs.SampleData.points(seed, 150, 3);
|
|
1168
1168
|
const predict = this.naiveBayes(points, "x", "y", "group");
|
|
1169
1169
|
const sweep = (column) => {
|
|
1170
1170
|
const [low = 0, high = 1] = _d3.extent.call(void 0, points, (row) => Number(row[column])), pad = (high - low) * 0.05;
|
|
@@ -1573,7 +1573,7 @@ var RESPONSE_MIDPOINT = 50;
|
|
|
1573
1573
|
var RESPONSE_WIDTH = 14;
|
|
1574
1574
|
var ExplainabilitySamples = class {
|
|
1575
1575
|
static #normals(seed, count) {
|
|
1576
|
-
const values =
|
|
1576
|
+
const values = _chunkLNWTC72Ycjs.SampleData.distribution(seed, count, 1).map((row) => (row.value - 40) / 8);
|
|
1577
1577
|
let i = 0;
|
|
1578
1578
|
return () => values[i++ % values.length];
|
|
1579
1579
|
}
|
|
@@ -1588,7 +1588,7 @@ var ExplainabilitySamples = class {
|
|
|
1588
1588
|
/** Synthetic ICE sweeps: `{ instance, x, prediction, observed }`, one saturating response per instance, whose slope flips for some. */
|
|
1589
1589
|
static iceCurves(seed) {
|
|
1590
1590
|
const z = this.#normals(seed, CURVES * 2);
|
|
1591
|
-
const observed =
|
|
1591
|
+
const observed = _chunkLNWTC72Ycjs.SampleData.points(seed, CURVES).map((row) => row.x);
|
|
1592
1592
|
const low = Math.min(...observed), high = Math.max(...observed);
|
|
1593
1593
|
const grid = Array.from({ length: GRID2 }, (_, i) => +(low + (high - low) * i / (GRID2 - 1)).toFixed(2));
|
|
1594
1594
|
return observed.flatMap((at, i) => {
|