@topolab/tda 0.0.0-stage → 0.3.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.
Files changed (90) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/CITATION.cff +72 -0
  3. package/LICENSE +21 -0
  4. package/README.md +100 -2
  5. package/SECURITY.md +34 -0
  6. package/THIRD_PARTY_LICENSES.md +696 -0
  7. package/dist/build_info.json +12 -0
  8. package/dist/check.d.ts +118 -0
  9. package/dist/check.d.ts.map +1 -0
  10. package/dist/check.js +298 -0
  11. package/dist/check.js.map +1 -0
  12. package/dist/complex.d.ts +543 -0
  13. package/dist/complex.d.ts.map +1 -0
  14. package/dist/complex.js +712 -0
  15. package/dist/complex.js.map +1 -0
  16. package/dist/diagram.d.ts +116 -0
  17. package/dist/diagram.d.ts.map +1 -0
  18. package/dist/diagram.js +238 -0
  19. package/dist/diagram.js.map +1 -0
  20. package/dist/diagram_of.d.ts +17 -0
  21. package/dist/diagram_of.d.ts.map +1 -0
  22. package/dist/diagram_of.js +40 -0
  23. package/dist/diagram_of.js.map +1 -0
  24. package/dist/experimental.d.ts +14 -0
  25. package/dist/experimental.d.ts.map +1 -0
  26. package/dist/experimental.js +13 -0
  27. package/dist/experimental.js.map +1 -0
  28. package/dist/flat.d.ts +64 -0
  29. package/dist/flat.d.ts.map +1 -0
  30. package/dist/flat.js +158 -0
  31. package/dist/flat.js.map +1 -0
  32. package/dist/index.d.ts +38 -0
  33. package/dist/index.d.ts.map +1 -0
  34. package/dist/index.js +29 -0
  35. package/dist/index.js.map +1 -0
  36. package/dist/ladder/tda_ladder.d.ts +223 -0
  37. package/dist/ladder/tda_ladder.js +1360 -0
  38. package/dist/ladder/tda_ladder_bg.wasm +0 -0
  39. package/dist/ladder/tda_ladder_bg.wasm.d.ts +43 -0
  40. package/dist/ladder.d.ts +306 -0
  41. package/dist/ladder.d.ts.map +1 -0
  42. package/dist/ladder.js +607 -0
  43. package/dist/ladder.js.map +1 -0
  44. package/dist/load.d.ts +53 -0
  45. package/dist/load.d.ts.map +1 -0
  46. package/dist/load.js +173 -0
  47. package/dist/load.js.map +1 -0
  48. package/dist/memory.d.ts +58 -0
  49. package/dist/memory.d.ts.map +1 -0
  50. package/dist/memory.js +2 -0
  51. package/dist/memory.js.map +1 -0
  52. package/dist/persistence.d.ts +349 -0
  53. package/dist/persistence.d.ts.map +1 -0
  54. package/dist/persistence.js +478 -0
  55. package/dist/persistence.js.map +1 -0
  56. package/dist/pkg/tda_wasm.d.ts +13 -0
  57. package/dist/pkg/tda_wasm.js +1900 -0
  58. package/dist/prepared.d.ts +62 -0
  59. package/dist/prepared.d.ts.map +1 -0
  60. package/dist/prepared.js +81 -0
  61. package/dist/prepared.js.map +1 -0
  62. package/dist/source.d.ts +43 -0
  63. package/dist/source.d.ts.map +1 -0
  64. package/dist/source.js +99 -0
  65. package/dist/source.js.map +1 -0
  66. package/dist/tda.wasm +0 -0
  67. package/dist/types.d.ts +146 -0
  68. package/dist/types.d.ts.map +1 -0
  69. package/dist/types.js +2 -0
  70. package/dist/types.js.map +1 -0
  71. package/dist/vineyard.d.ts +278 -0
  72. package/dist/vineyard.d.ts.map +1 -0
  73. package/dist/vineyard.js +236 -0
  74. package/dist/vineyard.js.map +1 -0
  75. package/package.json +77 -4
  76. package/src/check.ts +338 -0
  77. package/src/complex.ts +1179 -0
  78. package/src/diagram.ts +299 -0
  79. package/src/diagram_of.ts +40 -0
  80. package/src/experimental.ts +13 -0
  81. package/src/flat.ts +204 -0
  82. package/src/index.ts +155 -0
  83. package/src/ladder.ts +903 -0
  84. package/src/load.ts +201 -0
  85. package/src/memory.ts +58 -0
  86. package/src/persistence.ts +752 -0
  87. package/src/prepared.ts +111 -0
  88. package/src/source.ts +132 -0
  89. package/src/types.ts +163 -0
  90. package/src/vineyard.ts +463 -0
package/src/index.ts ADDED
@@ -0,0 +1,155 @@
1
+ /**
2
+ * `@topolab/tda`: topolab TDA, topological data analysis in Rust compiled
3
+ * to WebAssembly. Call {@link load} once; the functions are then plain calls.
4
+ *
5
+ * Point clouds are `{ coords, d }` (row-major `Float64Array`, `d`
6
+ * coordinates per point; {@link pointCloud} converts rows), images and
7
+ * volumes `{ values, shape }` in NumPy's order. Complexes come back as typed
8
+ * arrays (`{ vertices, offsets, filtrations, scale }`) and diagrams as one
9
+ * `[birth, death, …]` array per homology dimension (`{ pairs, scale, coeff }`).
10
+ * Results are plain objects of typed arrays, numbers, strings and booleans,
11
+ * so they survive `postMessage` and `structuredClone` whole. A bad argument
12
+ * throws a `TypeError` (wrong type, or an option the function does not
13
+ * take) or a `RangeError` (out of range) whose message names the parameter;
14
+ * an input over a size limit throws a `RangeError`, and a failure inside an
15
+ * engine an `Error` with the engine's message.
16
+ *
17
+ * Functions are named for what they return: `xComplex` a filtered complex,
18
+ * `xPersistence` a persistence diagram, `diagramX` a distance between two
19
+ * diagrams; variants are options.
20
+ *
21
+ * @packageDocumentation
22
+ */
23
+
24
+ export { load, unload, isLoaded, version } from './load.js';
25
+ export type { LoadSource } from './load.js';
26
+ export type { PointCloud, Vec } from './check.js';
27
+ export type {
28
+ Complex,
29
+ ComplexLike,
30
+ CubicalComplex,
31
+ Diagram,
32
+ DistanceMatrix,
33
+ Grid,
34
+ BuilderPersistence,
35
+ BuilderPersistenceOptions,
36
+ Scale,
37
+ Simplex
38
+ } from './types.js';
39
+
40
+ export {
41
+ ripsComplex,
42
+ cechComplex,
43
+ cechPersistence,
44
+ delaunayCechComplex,
45
+ alphaComplex,
46
+ alphaPersistence,
47
+ coupledAlphaComplex,
48
+ witnessComplex,
49
+ kFoldCoverComplex,
50
+ kFoldCoverPersistence,
51
+ ellipsoids,
52
+ ellipsoidRipsComplex,
53
+ ellipsoidRipsPersistence,
54
+ ellipsoidCechComplex,
55
+ ellipsoidCechPersistence,
56
+ wings,
57
+ wingComplex,
58
+ wingPersistence,
59
+ boxFiltration,
60
+ boxFiltrationPersistence,
61
+ cubicalComplex
62
+ } from './complex.js';
63
+ export type {
64
+ RipsComplexOptions,
65
+ CechComplexOptions,
66
+ CechPersistenceOptions,
67
+ DelaunayCechComplexOptions,
68
+ AlphaComplexOptions,
69
+ AlphaPersistenceOptions,
70
+ AlphaPersistence,
71
+ Flattened,
72
+ FlattenableComplex,
73
+ CoupledAlphaComplexOptions,
74
+ WitnessComplexOptions,
75
+ KFoldCoverComplex,
76
+ KFoldCoverComplexOptions,
77
+ KFoldCoverDiagnostics,
78
+ KFoldCoverPersistenceOptions,
79
+ EllipsoidAxes,
80
+ EllipsoidGeometry,
81
+ EllipsoidOptions,
82
+ EllipsoidRipsComplexOptions,
83
+ EllipsoidRipsPersistenceOptions,
84
+ EllipsoidCechComplexOptions,
85
+ EllipsoidCechPersistenceOptions,
86
+ WingGeometry,
87
+ WingNormalSource,
88
+ WingOptions,
89
+ WingComplexOptions,
90
+ WingPersistenceOptions,
91
+ BoxExtent,
92
+ BoxFiltration,
93
+ BoxFiltrationDiagnostics,
94
+ BoxFiltrationOptions,
95
+ BoxFiltrationPersistenceOptions
96
+ } from './complex.js';
97
+
98
+ export {
99
+ persistence,
100
+ ripsPersistence,
101
+ cubicalPersistence,
102
+ zigzagPersistence,
103
+ insertOp,
104
+ removeOp,
105
+ volumeOptimalCycles
106
+ } from './persistence.js';
107
+ export type {
108
+ PersistenceOptions,
109
+ RipsPersistence,
110
+ RipsPersistenceOptions,
111
+ RipsRepresentatives,
112
+ RepresentativesOptions,
113
+ CubicalPersistenceOptions,
114
+ InsertOp,
115
+ RemoveOp,
116
+ ZigzagOp,
117
+ PackedZigzag,
118
+ ZigzagPersistence,
119
+ ZigzagPersistenceOptions,
120
+ VolumeOptimalCycles,
121
+ VolumeOptimalCyclesOptions
122
+ } from './persistence.js';
123
+
124
+ export { cubicalVineyard, ripsVineyard, vineyard } from './vineyard.js';
125
+ export type {
126
+ CubicalVineyard,
127
+ RipsVineyard,
128
+ RipsVineyardOptions,
129
+ Vineyard,
130
+ VineyardOptions,
131
+ VineyardRepresentatives,
132
+ VineyardRepresentativesOptions
133
+ } from './vineyard.js';
134
+
135
+ export {
136
+ bettiNumbers,
137
+ bettiCurve,
138
+ persistenceLandscape,
139
+ persistenceImage,
140
+ diagramWasserstein,
141
+ diagramBottleneck
142
+ } from './diagram.js';
143
+ export type {
144
+ PersistenceLandscapeOptions,
145
+ ImageBounds,
146
+ PersistenceImage,
147
+ PersistenceImageOptions,
148
+ DiagramWassersteinOptions,
149
+ DiagramMatching
150
+ } from './diagram.js';
151
+
152
+ export { pointCloud, materialize, flatten } from './flat.js';
153
+ export type { RipsRepresentative, VolumeOptimalCycle } from './flat.js';
154
+
155
+ export type { CapacityError, CapacityDetails } from './memory.js';