@justinelliottcobb/amari-wasm 0.11.0 → 0.12.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.
package/amari_wasm.d.ts CHANGED
@@ -28,6 +28,10 @@ export function validate_relativistic_module(): boolean;
28
28
  * Initialize the fusion module
29
29
  */
30
30
  export function initFusion(): void;
31
+ /**
32
+ * Initialize the holographic memory module
33
+ */
34
+ export function initHolographic(): void;
31
35
  /**
32
36
  * Integrate a JavaScript function over an interval
33
37
  *
@@ -100,7 +104,6 @@ export enum WasmIntegrationMethod {
100
104
  export class AutoDiff {
101
105
  private constructor();
102
106
  free(): void;
103
- [Symbol.dispose](): void;
104
107
  /**
105
108
  * Linear layer forward pass (y = Wx + b) with automatic gradients
106
109
  */
@@ -124,7 +127,6 @@ export class AutoDiff {
124
127
  export class AutomataBatchOperations {
125
128
  private constructor();
126
129
  free(): void;
127
- [Symbol.dispose](): void;
128
130
  /**
129
131
  * Evolve multiple CA systems in parallel
130
132
  */
@@ -144,7 +146,6 @@ export class AutomataBatchOperations {
144
146
  export class AutomataUtils {
145
147
  private constructor();
146
148
  free(): void;
147
- [Symbol.dispose](): void;
148
149
  /**
149
150
  * Validate grid dimensions and format
150
151
  */
@@ -168,7 +169,6 @@ export class AutomataUtils {
168
169
  export class BatchOperations {
169
170
  private constructor();
170
171
  free(): void;
171
- [Symbol.dispose](): void;
172
172
  /**
173
173
  * Batch geometric product: compute a[i] * b[i] for all i
174
174
  * Optimized for WebAssembly performance with reduced allocations
@@ -185,7 +185,6 @@ export class BatchOperations {
185
185
  export class BatchOps {
186
186
  private constructor();
187
187
  free(): void;
188
- [Symbol.dispose](): void;
189
188
  /**
190
189
  * Matrix multiplication with automatic gradients
191
190
  */
@@ -205,7 +204,6 @@ export class BatchOps {
205
204
  export class EnumerativeBatch {
206
205
  private constructor();
207
206
  free(): void;
208
- [Symbol.dispose](): void;
209
207
  /**
210
208
  * Compute multiple Bézout intersections in batch
211
209
  */
@@ -225,7 +223,6 @@ export class EnumerativeBatch {
225
223
  export class EnumerativeUtils {
226
224
  private constructor();
227
225
  free(): void;
228
- [Symbol.dispose](): void;
229
226
  /**
230
227
  * Validate partition for Schubert calculus
231
228
  */
@@ -257,7 +254,6 @@ export class EnumerativeUtils {
257
254
  export class FusionBatchOperations {
258
255
  private constructor();
259
256
  free(): void;
260
- [Symbol.dispose](): void;
261
257
  /**
262
258
  * Optimize TDC parameters using gradient information
263
259
  */
@@ -272,6 +268,8 @@ export class FusionBatchOperations {
272
268
  static batchEvaluate(tdc_a_batch: Float64Array, tdc_b_batch: Float64Array, batch_size: number): Float64Array;
273
269
  /**
274
270
  * Batch sensitivity analysis for gradient-based optimization
271
+ *
272
+ * Note: Using simplified implementation based on gradient norms
275
273
  */
276
274
  static batchSensitivity(tdc_batch: Float64Array, batch_size: number): Float64Array;
277
275
  /**
@@ -289,7 +287,6 @@ export class FusionBatchOperations {
289
287
  export class FusionUtils {
290
288
  private constructor();
291
289
  free(): void;
292
- [Symbol.dispose](): void;
293
290
  /**
294
291
  * Validate logits for numerical stability
295
292
  */
@@ -300,10 +297,14 @@ export class FusionUtils {
300
297
  static normalizeLogits(logits: Float64Array): Float64Array;
301
298
  /**
302
299
  * Convert softmax probabilities to tropical representation
300
+ *
301
+ * Note: Direct conversion helpers are not in v0.12.0, using manual implementation
303
302
  */
304
303
  static softmaxToTropical(probs: Float64Array): Float64Array;
305
304
  /**
306
305
  * Convert tropical numbers back to softmax probabilities
306
+ *
307
+ * Note: Direct conversion helpers are not in v0.12.0, using manual implementation
307
308
  */
308
309
  static tropicalToSoftmax(tropical_values: Float64Array): Float64Array;
309
310
  }
@@ -313,7 +314,6 @@ export class FusionUtils {
313
314
  export class InfoGeomUtils {
314
315
  private constructor();
315
316
  free(): void;
316
- [Symbol.dispose](): void;
317
317
  /**
318
318
  * Compute cross-entropy between two distributions
319
319
  */
@@ -349,7 +349,6 @@ export class InfoGeomUtils {
349
349
  export class Integration {
350
350
  private constructor();
351
351
  free(): void;
352
- [Symbol.dispose](): void;
353
352
  /**
354
353
  * Compute 1D definite integral using Simpson's rule
355
354
  *
@@ -398,7 +397,6 @@ export class Integration {
398
397
  export class MLOps {
399
398
  private constructor();
400
399
  free(): void;
401
- [Symbol.dispose](): void;
402
400
  /**
403
401
  * Batch apply activation function with gradients
404
402
  */
@@ -422,7 +420,6 @@ export class MLOps {
422
420
  export class NetworkUtils {
423
421
  private constructor();
424
422
  free(): void;
425
- [Symbol.dispose](): void;
426
423
  /**
427
424
  * Create a random geometric network for testing
428
425
  */
@@ -444,7 +441,6 @@ export class NetworkUtils {
444
441
  */
445
442
  export class NumericalDerivative {
446
443
  free(): void;
447
- [Symbol.dispose](): void;
448
444
  /**
449
445
  * Compute divergence of a vector field at a point
450
446
  *
@@ -528,7 +524,6 @@ export class NumericalDerivative {
528
524
  export class PerformanceOperations {
529
525
  private constructor();
530
526
  free(): void;
531
- [Symbol.dispose](): void;
532
527
  /**
533
528
  * Batch normalize vectors for efficiency
534
529
  */
@@ -564,7 +559,6 @@ export class PerformanceOperations {
564
559
  export class RiemannianManifold {
565
560
  private constructor();
566
561
  free(): void;
567
- [Symbol.dispose](): void;
568
562
  /**
569
563
  * Create a 2D hyperbolic plane (Poincaré half-plane model)
570
564
  *
@@ -674,7 +668,6 @@ export class RiemannianManifold {
674
668
  */
675
669
  export class ScalarField {
676
670
  free(): void;
677
- [Symbol.dispose](): void;
678
671
  /**
679
672
  * Batch evaluate the field at multiple points
680
673
  *
@@ -730,7 +723,6 @@ export class ScalarField {
730
723
  export class TropicalBatch {
731
724
  private constructor();
732
725
  free(): void;
733
- [Symbol.dispose](): void;
734
726
  /**
735
727
  * Convert array of log probabilities to tropical numbers and find maximum
736
728
  */
@@ -754,7 +746,6 @@ export class TropicalBatch {
754
746
  export class TropicalMLOps {
755
747
  private constructor();
756
748
  free(): void;
757
- [Symbol.dispose](): void;
758
749
  /**
759
750
  * Compute shortest paths using tropical algebra (Floyd-Warshall)
760
751
  */
@@ -785,7 +776,6 @@ export class TropicalMLOps {
785
776
  */
786
777
  export class VectorField {
787
778
  free(): void;
788
- [Symbol.dispose](): void;
789
779
  /**
790
780
  * Create a 2D vector field from a JavaScript function
791
781
  *
@@ -824,7 +814,6 @@ export class VectorField {
824
814
  */
825
815
  export class WasmAlphaConnection {
826
816
  free(): void;
827
- [Symbol.dispose](): void;
828
817
  /**
829
818
  * Check if this is the mixture connection (α = -1)
830
819
  */
@@ -851,7 +840,6 @@ export class WasmAlphaConnection {
851
840
  */
852
841
  export class WasmChowClass {
853
842
  free(): void;
854
- [Symbol.dispose](): void;
855
843
  /**
856
844
  * Get the degree of this Chow class
857
845
  */
@@ -895,7 +883,6 @@ export class WasmChowClass {
895
883
  export class WasmCommunity {
896
884
  private constructor();
897
885
  free(): void;
898
- [Symbol.dispose](): void;
899
886
  /**
900
887
  * Get cohesion score
901
888
  */
@@ -916,7 +903,6 @@ export class WasmCommunity {
916
903
  */
917
904
  export class WasmCountingMeasure {
918
905
  free(): void;
919
- [Symbol.dispose](): void;
920
906
  /**
921
907
  * Check if a set is measurable under counting measure
922
908
  * (all sets are measurable under counting measure)
@@ -939,7 +925,6 @@ export class WasmCountingMeasure {
939
925
  */
940
926
  export class WasmDualNumber {
941
927
  free(): void;
942
- [Symbol.dispose](): void;
943
928
  /**
944
929
  * Natural logarithm
945
930
  */
@@ -1006,6 +991,8 @@ export class WasmDualNumber {
1006
991
  powi(n: number): WasmDualNumber;
1007
992
  /**
1008
993
  * ReLU activation function
994
+ *
995
+ * Note: Manual implementation as relu() is not in v0.12.0 DualNumber API
1009
996
  */
1010
997
  relu(): WasmDualNumber;
1011
998
  /**
@@ -1038,6 +1025,9 @@ export class WasmDualNumber {
1038
1025
  getReal(): number;
1039
1026
  /**
1040
1027
  * Softplus activation function
1028
+ *
1029
+ * Note: Manual implementation as softplus() is not in v0.12.0 DualNumber API
1030
+ * softplus(x) = ln(1 + exp(x))
1041
1031
  */
1042
1032
  softplus(): WasmDualNumber;
1043
1033
  /**
@@ -1050,7 +1040,6 @@ export class WasmDualNumber {
1050
1040
  */
1051
1041
  export class WasmDuallyFlatManifold {
1052
1042
  free(): void;
1053
- [Symbol.dispose](): void;
1054
1043
  /**
1055
1044
  * Compute JS divergence (symmetric version of KL divergence)
1056
1045
  */
@@ -1082,7 +1071,6 @@ export class WasmDuallyFlatManifold {
1082
1071
  export class WasmEvaluationResult {
1083
1072
  private constructor();
1084
1073
  free(): void;
1085
- [Symbol.dispose](): void;
1086
1074
  /**
1087
1075
  * Get gradient norm from dual numbers
1088
1076
  */
@@ -1110,7 +1098,6 @@ export class WasmEvaluationResult {
1110
1098
  export class WasmFisherInformationMatrix {
1111
1099
  private constructor();
1112
1100
  free(): void;
1113
- [Symbol.dispose](): void;
1114
1101
  /**
1115
1102
  * Get eigenvalues of the Fisher matrix
1116
1103
  */
@@ -1130,7 +1117,6 @@ export class WasmFisherInformationMatrix {
1130
1117
  export class WasmFisherMeasure {
1131
1118
  private constructor();
1132
1119
  free(): void;
1133
- [Symbol.dispose](): void;
1134
1120
  /**
1135
1121
  * Create Fisher measure from a parametric density
1136
1122
  */
@@ -1150,7 +1136,6 @@ export class WasmFisherMeasure {
1150
1136
  export class WasmFourVelocity {
1151
1137
  private constructor();
1152
1138
  free(): void;
1153
- [Symbol.dispose](): void;
1154
1139
  /**
1155
1140
  * Create four-velocity from 3-velocity components
1156
1141
  */
@@ -1186,7 +1171,6 @@ export class WasmFourVelocity {
1186
1171
  export class WasmGeodesicIntegrator {
1187
1172
  private constructor();
1188
1173
  free(): void;
1189
- [Symbol.dispose](): void;
1190
1174
  /**
1191
1175
  * Propagate particle through spacetime
1192
1176
  */
@@ -1201,7 +1185,6 @@ export class WasmGeodesicIntegrator {
1201
1185
  */
1202
1186
  export class WasmGeometricCA {
1203
1187
  free(): void;
1204
- [Symbol.dispose](): void;
1205
1188
  /**
1206
1189
  * Add a glider pattern (if supported by the rule)
1207
1190
  */
@@ -1268,7 +1251,6 @@ export class WasmGeometricCA {
1268
1251
  */
1269
1252
  export class WasmGeometricEdge {
1270
1253
  free(): void;
1271
- [Symbol.dispose](): void;
1272
1254
  /**
1273
1255
  * Create a new geometric edge
1274
1256
  */
@@ -1291,7 +1273,6 @@ export class WasmGeometricEdge {
1291
1273
  */
1292
1274
  export class WasmGeometricNetwork {
1293
1275
  free(): void;
1294
- [Symbol.dispose](): void;
1295
1276
  /**
1296
1277
  * Get the degree of a node
1297
1278
  */
@@ -1378,7 +1359,6 @@ export class WasmGeometricNetwork {
1378
1359
  */
1379
1360
  export class WasmGpuOptimizer {
1380
1361
  free(): void;
1381
- [Symbol.dispose](): void;
1382
1362
  /**
1383
1363
  * Initialize GPU context for optimization
1384
1364
  */
@@ -1405,7 +1385,6 @@ export class WasmGpuOptimizer {
1405
1385
  */
1406
1386
  export class WasmGrassmannian {
1407
1387
  free(): void;
1408
- [Symbol.dispose](): void;
1409
1388
  /**
1410
1389
  * Get the dimension of this Grassmannian
1411
1390
  */
@@ -1419,12 +1398,65 @@ export class WasmGrassmannian {
1419
1398
  */
1420
1399
  constructor(k: number, n: number);
1421
1400
  }
1401
+ /**
1402
+ * WASM wrapper for HolographicMemory using ProductClifford algebra
1403
+ */
1404
+ export class WasmHolographicMemory {
1405
+ free(): void;
1406
+ /**
1407
+ * Get the number of stored items
1408
+ */
1409
+ itemCount(): number;
1410
+ /**
1411
+ * Get the estimated SNR (signal-to-noise ratio)
1412
+ */
1413
+ estimatedSnr(): number;
1414
+ /**
1415
+ * Generate a random versor (for use as key/value)
1416
+ */
1417
+ static randomVersor(num_factors: number): Float64Array;
1418
+ /**
1419
+ * Check if memory is near capacity
1420
+ */
1421
+ isNearCapacity(): boolean;
1422
+ /**
1423
+ * Create with key tracking enabled (for attribution)
1424
+ */
1425
+ static withKeyTracking(): WasmHolographicMemory;
1426
+ /**
1427
+ * Get retrieval confidence for a key
1428
+ */
1429
+ retrieveConfidence(key: Float64Array): number;
1430
+ /**
1431
+ * Get capacity information
1432
+ */
1433
+ theoreticalCapacity(): number;
1434
+ /**
1435
+ * Create a new holographic memory with default settings
1436
+ */
1437
+ constructor();
1438
+ /**
1439
+ * Clear all stored items
1440
+ */
1441
+ clear(): void;
1442
+ /**
1443
+ * Store a key-value pair in memory (using flat coefficient arrays)
1444
+ *
1445
+ * Each array should have 256 coefficients for ProductCl3x32.
1446
+ */
1447
+ store(key: Float64Array, value: Float64Array): void;
1448
+ /**
1449
+ * Retrieve a value by key
1450
+ *
1451
+ * Returns the retrieved coefficients as a Float64Array.
1452
+ */
1453
+ retrieve(key: Float64Array): Float64Array;
1454
+ }
1422
1455
  /**
1423
1456
  * WASM wrapper for Inverse CA Designer (simplified)
1424
1457
  */
1425
1458
  export class WasmInverseCADesigner {
1426
1459
  free(): void;
1427
- [Symbol.dispose](): void;
1428
1460
  /**
1429
1461
  * Set the target pattern that we want to achieve
1430
1462
  */
@@ -1450,7 +1482,6 @@ export class WasmInverseCADesigner {
1450
1482
  */
1451
1483
  export class WasmLebesgueMeasure {
1452
1484
  free(): void;
1453
- [Symbol.dispose](): void;
1454
1485
  /**
1455
1486
  * Compute the measure of a box (hyper-rectangle) with given side lengths
1456
1487
  */
@@ -1480,7 +1511,6 @@ export class WasmLebesgueMeasure {
1480
1511
  export class WasmModuliSpace {
1481
1512
  private constructor();
1482
1513
  free(): void;
1483
- [Symbol.dispose](): void;
1484
1514
  /**
1485
1515
  * Create moduli space of stable curves
1486
1516
  */
@@ -1511,7 +1541,6 @@ export class WasmModuliSpace {
1511
1541
  */
1512
1542
  export class WasmMultiDualNumber {
1513
1543
  free(): void;
1514
- [Symbol.dispose](): void;
1515
1544
  /**
1516
1545
  * Get a specific partial derivative
1517
1546
  */
@@ -1558,7 +1587,6 @@ export class WasmMultiDualNumber {
1558
1587
  */
1559
1588
  export class WasmMultiObjectiveOptimizer {
1560
1589
  free(): void;
1561
- [Symbol.dispose](): void;
1562
1590
  /**
1563
1591
  * Optimize a simple bi-objective problem
1564
1592
  * f1 = sum(x_i^2), f2 = sum((x_i - 1)^2)
@@ -1575,7 +1603,6 @@ export class WasmMultiObjectiveOptimizer {
1575
1603
  export class WasmMultiObjectiveResult {
1576
1604
  private constructor();
1577
1605
  free(): void;
1578
- [Symbol.dispose](): void;
1579
1606
  /**
1580
1607
  * Get number of generations
1581
1608
  */
@@ -1594,7 +1621,6 @@ export class WasmMultiObjectiveResult {
1594
1621
  */
1595
1622
  export class WasmMultivector {
1596
1623
  free(): void;
1597
- [Symbol.dispose](): void;
1598
1624
  /**
1599
1625
  * Create a basis vector (0-indexed)
1600
1626
  */
@@ -1685,7 +1711,6 @@ export class WasmMultivector {
1685
1711
  */
1686
1712
  export class WasmNodeMetadata {
1687
1713
  free(): void;
1688
- [Symbol.dispose](): void;
1689
1714
  /**
1690
1715
  * Create metadata with label
1691
1716
  */
@@ -1717,7 +1742,6 @@ export class WasmNodeMetadata {
1717
1742
  export class WasmOptimizationResult {
1718
1743
  private constructor();
1719
1744
  free(): void;
1720
- [Symbol.dispose](): void;
1721
1745
  /**
1722
1746
  * Get number of iterations
1723
1747
  */
@@ -1741,7 +1765,6 @@ export class WasmOptimizationResult {
1741
1765
  export class WasmOptimizationUtils {
1742
1766
  private constructor();
1743
1767
  free(): void;
1744
- [Symbol.dispose](): void;
1745
1768
  /**
1746
1769
  * Compute numerical gradient
1747
1770
  */
@@ -1757,7 +1780,6 @@ export class WasmOptimizationUtils {
1757
1780
  export class WasmParametricDensity {
1758
1781
  private constructor();
1759
1782
  free(): void;
1760
- [Symbol.dispose](): void;
1761
1783
  /**
1762
1784
  * Create an Exponential density Exp(λ)
1763
1785
  */
@@ -1802,7 +1824,6 @@ export class WasmParametricDensity {
1802
1824
  */
1803
1825
  export class WasmProbabilityMeasure {
1804
1826
  free(): void;
1805
- [Symbol.dispose](): void;
1806
1827
  /**
1807
1828
  * Get a description of this probability measure
1808
1829
  */
@@ -1825,7 +1846,6 @@ export class WasmProbabilityMeasure {
1825
1846
  */
1826
1847
  export class WasmProjectiveSpace {
1827
1848
  free(): void;
1828
- [Symbol.dispose](): void;
1829
1849
  /**
1830
1850
  * Get the dimension of this projective space
1831
1851
  */
@@ -1849,7 +1869,6 @@ export class WasmProjectiveSpace {
1849
1869
  export class WasmPropagationAnalysis {
1850
1870
  private constructor();
1851
1871
  free(): void;
1852
- [Symbol.dispose](): void;
1853
1872
  /**
1854
1873
  * Get convergence time
1855
1874
  */
@@ -1869,7 +1888,6 @@ export class WasmPropagationAnalysis {
1869
1888
  export class WasmRelativisticConstants {
1870
1889
  private constructor();
1871
1890
  free(): void;
1872
- [Symbol.dispose](): void;
1873
1891
  /**
1874
1892
  * Earth mass (kg)
1875
1893
  */
@@ -1892,7 +1910,6 @@ export class WasmRelativisticConstants {
1892
1910
  */
1893
1911
  export class WasmRelativisticParticle {
1894
1912
  free(): void;
1895
- [Symbol.dispose](): void;
1896
1913
  /**
1897
1914
  * Get 3D position components
1898
1915
  */
@@ -1938,13 +1955,36 @@ export class WasmRelativisticParticle {
1938
1955
  */
1939
1956
  to_string(): string;
1940
1957
  }
1958
+ /**
1959
+ * WASM wrapper for Resonator using ProductClifford algebra
1960
+ */
1961
+ export class WasmResonator {
1962
+ free(): void;
1963
+ /**
1964
+ * Get the codebook size
1965
+ */
1966
+ codebookSize(): number;
1967
+ /**
1968
+ * Get cleanup result with metadata
1969
+ */
1970
+ cleanupWithInfo(input: Float64Array): any;
1971
+ /**
1972
+ * Create a resonator from a flat codebook array
1973
+ *
1974
+ * Each item should have 256 coefficients for ProductCl3x32.
1975
+ */
1976
+ constructor(codebook_flat: Float64Array);
1977
+ /**
1978
+ * Clean up a noisy input to find the closest codebook item
1979
+ */
1980
+ cleanup(input: Float64Array): Float64Array;
1981
+ }
1941
1982
  /**
1942
1983
  * Rotor operations for WASM
1943
1984
  */
1944
1985
  export class WasmRotor {
1945
1986
  private constructor();
1946
1987
  free(): void;
1947
- [Symbol.dispose](): void;
1948
1988
  /**
1949
1989
  * Create a rotor from a bivector and angle
1950
1990
  */
@@ -1968,7 +2008,6 @@ export class WasmRotor {
1968
2008
  export class WasmSchwarzschildMetric {
1969
2009
  private constructor();
1970
2010
  free(): void;
1971
- [Symbol.dispose](): void;
1972
2011
  /**
1973
2012
  * Check for singularity at given position
1974
2013
  */
@@ -2003,7 +2042,6 @@ export class WasmSchwarzschildMetric {
2003
2042
  */
2004
2043
  export class WasmSelfAssembler {
2005
2044
  free(): void;
2006
- [Symbol.dispose](): void;
2007
2045
  /**
2008
2046
  * Add a component to the system
2009
2047
  */
@@ -2027,7 +2065,6 @@ export class WasmSelfAssembler {
2027
2065
  export class WasmSensitivityMap {
2028
2066
  private constructor();
2029
2067
  free(): void;
2030
- [Symbol.dispose](): void;
2031
2068
  /**
2032
2069
  * Get components with highest sensitivity (for optimization)
2033
2070
  */
@@ -2046,7 +2083,6 @@ export class WasmSensitivityMap {
2046
2083
  */
2047
2084
  export class WasmSimpleOptimizer {
2048
2085
  free(): void;
2049
- [Symbol.dispose](): void;
2050
2086
  /**
2051
2087
  * Optimize a simple quadratic function: minimize sum(c_i * x_i^2)
2052
2088
  */
@@ -2061,7 +2097,6 @@ export class WasmSimpleOptimizer {
2061
2097
  */
2062
2098
  export class WasmSpacetimeVector {
2063
2099
  free(): void;
2064
- [Symbol.dispose](): void;
2065
2100
  /**
2066
2101
  * Check if vector is timelike (massive particle)
2067
2102
  */
@@ -2121,7 +2156,6 @@ export class WasmSpacetimeVector {
2121
2156
  export class WasmTrajectoryPoint {
2122
2157
  private constructor();
2123
2158
  free(): void;
2124
- [Symbol.dispose](): void;
2125
2159
  /**
2126
2160
  * Time coordinate
2127
2161
  */
@@ -2136,7 +2170,6 @@ export class WasmTrajectoryPoint {
2136
2170
  */
2137
2171
  export class WasmTropicalCurve {
2138
2172
  free(): void;
2139
- [Symbol.dispose](): void;
2140
2173
  /**
2141
2174
  * Get the degree of this tropical curve
2142
2175
  */
@@ -2159,7 +2192,61 @@ export class WasmTropicalCurve {
2159
2192
  */
2160
2193
  export class WasmTropicalDualClifford {
2161
2194
  free(): void;
2162
- [Symbol.dispose](): void;
2195
+ /**
2196
+ * Compute similarity between two TDC objects
2197
+ *
2198
+ * Uses the proper Clifford inner product with reverse: <A B̃>₀ / (|A| |B|)
2199
+ * Returns a value in [-1, 1].
2200
+ */
2201
+ similarity(other: WasmTropicalDualClifford): number;
2202
+ /**
2203
+ * Create a random unit vector TDC (grade 1 only)
2204
+ *
2205
+ * Unit vectors are guaranteed invertible and useful for
2206
+ * proper VSA (Vector Symbolic Architecture) operations.
2207
+ */
2208
+ static randomVector(): WasmTropicalDualClifford;
2209
+ /**
2210
+ * Compute binding inverse
2211
+ *
2212
+ * If successful, `x.bind(x.bindingInverse()) ≈ identity`
2213
+ */
2214
+ bindingInverse(): WasmTropicalDualClifford;
2215
+ /**
2216
+ * Get the binding identity element
2217
+ *
2218
+ * `x.bind(identity) = x` for any x
2219
+ */
2220
+ static bindingIdentity(): WasmTropicalDualClifford;
2221
+ /**
2222
+ * Normalize the TDC to unit norm
2223
+ */
2224
+ normalizeToUnit(): WasmTropicalDualClifford;
2225
+ /**
2226
+ * Compute Clifford similarity (proper inner product with reverse)
2227
+ */
2228
+ cliffordSimilarity(other: WasmTropicalDualClifford): number;
2229
+ /**
2230
+ * Bind two TDC objects using geometric product (creates associations)
2231
+ *
2232
+ * The result is dissimilar to both inputs - useful for creating
2233
+ * key-value associations in holographic memory.
2234
+ */
2235
+ bind(other: WasmTropicalDualClifford): WasmTropicalDualClifford;
2236
+ /**
2237
+ * Bundle two TDC objects (superposition/aggregation)
2238
+ *
2239
+ * The result is similar to both inputs - useful for storing
2240
+ * multiple associations in the same memory trace.
2241
+ * `beta` controls soft (1.0) vs hard (∞) bundling.
2242
+ */
2243
+ bundle(other: WasmTropicalDualClifford, beta: number): WasmTropicalDualClifford;
2244
+ /**
2245
+ * Unbind: retrieve associated value
2246
+ *
2247
+ * If `bound = key.bind(value)`, then `key.unbind(bound) ≈ value`
2248
+ */
2249
+ unbind(other: WasmTropicalDualClifford): WasmTropicalDualClifford;
2163
2250
  /**
2164
2251
  * Create from logits (array of log-probabilities)
2165
2252
  */
@@ -2182,6 +2269,8 @@ export class WasmTropicalDualClifford {
2182
2269
  static randomWithScale(scale: number): WasmTropicalDualClifford;
2183
2270
  /**
2184
2271
  * Create from probability distribution
2272
+ *
2273
+ * Note: Converts probabilities to log space for tropical representation
2185
2274
  */
2186
2275
  static fromProbabilities(probs: Float64Array): WasmTropicalDualClifford;
2187
2276
  /**
@@ -2194,6 +2283,9 @@ export class WasmTropicalDualClifford {
2194
2283
  getDualDerivatives(): Float64Array;
2195
2284
  /**
2196
2285
  * Perform sensitivity analysis for gradient-based optimization
2286
+ *
2287
+ * Note: This feature is not yet available in v0.12.0
2288
+ * TODO: Re-enable when sensitivity_analysis is added to TropicalDualClifford
2197
2289
  */
2198
2290
  sensitivityAnalysis(): WasmSensitivityMap;
2199
2291
  /**
@@ -2241,43 +2333,11 @@ export class WasmTropicalDualClifford {
2241
2333
  */
2242
2334
  transform(transformation: WasmTropicalDualClifford): WasmTropicalDualClifford;
2243
2335
  }
2244
- /**
2245
- * WASM wrapper for LLM token distributions
2246
- */
2247
- export class WasmTropicalDualDistribution {
2248
- free(): void;
2249
- [Symbol.dispose](): void;
2250
- /**
2251
- * Compute KL divergence with automatic gradients
2252
- */
2253
- klDivergence(other: WasmTropicalDualDistribution): any;
2254
- /**
2255
- * Get vocabulary size
2256
- */
2257
- getVocabSize(): number;
2258
- /**
2259
- * Get attention pattern as tropical polytope vertices
2260
- */
2261
- attentionPolytope(): Float64Array;
2262
- /**
2263
- * Compute geometric alignment with reference distribution
2264
- */
2265
- geometricAlignment(reference: WasmTropicalDualDistribution): number;
2266
- /**
2267
- * Generate most likely sequence using tropical algebra (Viterbi-like)
2268
- */
2269
- mostLikelySequence(length: number): Uint32Array;
2270
- /**
2271
- * Create from logit vector (typical LLM output)
2272
- */
2273
- constructor(logits: Float64Array);
2274
- }
2275
2336
  /**
2276
2337
  * Tropical (max-plus) algebra operations for optimization
2277
2338
  */
2278
2339
  export class WasmTropicalMeasure {
2279
2340
  free(): void;
2280
- [Symbol.dispose](): void;
2281
2341
  /**
2282
2342
  * Tropical integration (supremum over region)
2283
2343
  */
@@ -2304,7 +2364,6 @@ export class WasmTropicalMeasure {
2304
2364
  */
2305
2365
  export class WasmTropicalNetwork {
2306
2366
  free(): void;
2307
- [Symbol.dispose](): void;
2308
2367
  /**
2309
2368
  * Create tropical network from weight matrix
2310
2369
  */
@@ -2335,9 +2394,10 @@ export class WasmTropicalNetwork {
2335
2394
  */
2336
2395
  export class WasmTropicalNumber {
2337
2396
  free(): void;
2338
- [Symbol.dispose](): void;
2339
2397
  /**
2340
2398
  * Check if this is infinite
2399
+ *
2400
+ * Note: Manual implementation as is_infinity() not in v0.12.0 API
2341
2401
  */
2342
2402
  isInfinity(): boolean;
2343
2403
  /**
@@ -2354,6 +2414,8 @@ export class WasmTropicalNumber {
2354
2414
  tropicalPow(n: number): WasmTropicalNumber;
2355
2415
  /**
2356
2416
  * Create from log probability
2417
+ *
2418
+ * Note: Manual implementation as from_log_prob() not in v0.12.0 API
2357
2419
  */
2358
2420
  static fromLogProb(log_p: number): WasmTropicalNumber;
2359
2421
  /**
@@ -2366,6 +2428,8 @@ export class WasmTropicalNumber {
2366
2428
  mul(other: WasmTropicalNumber): WasmTropicalNumber;
2367
2429
  /**
2368
2430
  * Negation
2431
+ *
2432
+ * Note: Manual implementation as Neg trait not implemented in v0.12.0 API
2369
2433
  */
2370
2434
  neg(): WasmTropicalNumber;
2371
2435
  /**
@@ -2390,6 +2454,8 @@ export class WasmTropicalNumber {
2390
2454
  isZero(): boolean;
2391
2455
  /**
2392
2456
  * Convert to probability (via exp)
2457
+ *
2458
+ * Note: Manual implementation as to_prob() not in v0.12.0 API
2393
2459
  */
2394
2460
  toProb(): number;
2395
2461
  /**
@@ -2402,7 +2468,6 @@ export class WasmTropicalNumber {
2402
2468
  */
2403
2469
  export class WasmTropicalPolynomial {
2404
2470
  free(): void;
2405
- [Symbol.dispose](): void;
2406
2471
  /**
2407
2472
  * Find tropical roots of the polynomial
2408
2473
  */
@@ -2425,7 +2490,6 @@ export class WasmTropicalPolynomial {
2425
2490
  */
2426
2491
  export class WasmTropicalViterbi {
2427
2492
  free(): void;
2428
- [Symbol.dispose](): void;
2429
2493
  /**
2430
2494
  * Compute forward probabilities for all states
2431
2495
  */
@@ -2466,6 +2530,7 @@ export interface InitOutput {
2466
2530
  readonly __wbg_wasmgeometricca_free: (a: number, b: number) => void;
2467
2531
  readonly __wbg_wasmgeometricnetwork_free: (a: number, b: number) => void;
2468
2532
  readonly __wbg_wasmgrassmannian_free: (a: number, b: number) => void;
2533
+ readonly __wbg_wasmholographicmemory_free: (a: number, b: number) => void;
2469
2534
  readonly __wbg_wasminversecadesigner_free: (a: number, b: number) => void;
2470
2535
  readonly __wbg_wasmlebesguemeasure_free: (a: number, b: number) => void;
2471
2536
  readonly __wbg_wasmmodulispace_free: (a: number, b: number) => void;
@@ -2475,12 +2540,12 @@ export interface InitOutput {
2475
2540
  readonly __wbg_wasmoptimizationresult_free: (a: number, b: number) => void;
2476
2541
  readonly __wbg_wasmpropagationanalysis_free: (a: number, b: number) => void;
2477
2542
  readonly __wbg_wasmrelativisticparticle_free: (a: number, b: number) => void;
2543
+ readonly __wbg_wasmresonator_free: (a: number, b: number) => void;
2478
2544
  readonly __wbg_wasmschwarzschildmetric_free: (a: number, b: number) => void;
2479
2545
  readonly __wbg_wasmselfassembler_free: (a: number, b: number) => void;
2480
2546
  readonly __wbg_wasmsensitivitymap_free: (a: number, b: number) => void;
2481
2547
  readonly __wbg_wasmtrajectorypoint_free: (a: number, b: number) => void;
2482
2548
  readonly __wbg_wasmtropicaldualclifford_free: (a: number, b: number) => void;
2483
- readonly __wbg_wasmtropicaldualdistribution_free: (a: number, b: number) => void;
2484
2549
  readonly __wbg_wasmtropicalnetwork_free: (a: number, b: number) => void;
2485
2550
  readonly __wbg_wasmtropicalpolynomial_free: (a: number, b: number) => void;
2486
2551
  readonly __wbg_wasmtropicalviterbi_free: (a: number, b: number) => void;
@@ -2526,11 +2591,11 @@ export interface InitOutput {
2526
2591
  readonly infogeomutils_mutualInformation: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
2527
2592
  readonly infogeomutils_normalize: (a: number, b: number) => [number, number, number, number];
2528
2593
  readonly infogeomutils_randomSimplex: (a: number) => [number, number];
2529
- readonly infogeomutils_softmax: (a: number, b: number) => [number, number];
2530
2594
  readonly init: () => void;
2531
2595
  readonly initAutomata: () => void;
2532
2596
  readonly initEnumerative: () => void;
2533
2597
  readonly initFusion: () => void;
2598
+ readonly initHolographic: () => void;
2534
2599
  readonly integrate: (a: any, b: number, c: number, d: number, e: number) => [number, number, number];
2535
2600
  readonly integration_integrate1D: (a: any, b: number, c: number, d: number) => [number, number, number];
2536
2601
  readonly integration_integrate2D: (a: any, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
@@ -2689,6 +2754,17 @@ export interface InitOutput {
2689
2754
  readonly wasmgrassmannian_getDimension: (a: number) => number;
2690
2755
  readonly wasmgrassmannian_getParameters: (a: number) => [number, number];
2691
2756
  readonly wasmgrassmannian_new: (a: number, b: number) => [number, number, number];
2757
+ readonly wasmholographicmemory_clear: (a: number) => void;
2758
+ readonly wasmholographicmemory_estimatedSnr: (a: number) => number;
2759
+ readonly wasmholographicmemory_isNearCapacity: (a: number) => number;
2760
+ readonly wasmholographicmemory_itemCount: (a: number) => number;
2761
+ readonly wasmholographicmemory_new: () => number;
2762
+ readonly wasmholographicmemory_randomVersor: (a: number) => [number, number];
2763
+ readonly wasmholographicmemory_retrieve: (a: number, b: number, c: number) => [number, number, number, number];
2764
+ readonly wasmholographicmemory_retrieveConfidence: (a: number, b: number, c: number) => [number, number, number];
2765
+ readonly wasmholographicmemory_store: (a: number, b: number, c: number, d: number, e: number) => [number, number];
2766
+ readonly wasmholographicmemory_theoreticalCapacity: (a: number) => number;
2767
+ readonly wasmholographicmemory_withKeyTracking: () => number;
2692
2768
  readonly wasminversecadesigner_evaluateFitness: (a: number, b: number, c: number) => [number, number, number];
2693
2769
  readonly wasminversecadesigner_findSeed: (a: number, b: number, c: number) => [number, number, number, number];
2694
2770
  readonly wasminversecadesigner_new: (a: number, b: number) => number;
@@ -2777,6 +2853,10 @@ export interface InitOutput {
2777
2853
  readonly wasmrelativisticparticle_to_string: (a: number) => [number, number];
2778
2854
  readonly wasmrelativisticparticle_total_energy: (a: number) => number;
2779
2855
  readonly wasmrelativisticparticle_with_energy: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
2856
+ readonly wasmresonator_cleanup: (a: number, b: number, c: number) => [number, number, number, number];
2857
+ readonly wasmresonator_cleanupWithInfo: (a: number, b: number, c: number) => [number, number, number];
2858
+ readonly wasmresonator_codebookSize: (a: number) => number;
2859
+ readonly wasmresonator_new: (a: number, b: number) => [number, number, number];
2780
2860
  readonly wasmrotor_apply: (a: number, b: number) => number;
2781
2861
  readonly wasmrotor_compose: (a: number, b: number) => number;
2782
2862
  readonly wasmrotor_fromBivector: (a: number, b: number) => number;
@@ -2807,6 +2887,11 @@ export interface InitOutput {
2807
2887
  readonly wasmtropicalcurve_getDegree: (a: number) => number;
2808
2888
  readonly wasmtropicalcurve_new: (a: number, b: number) => number;
2809
2889
  readonly wasmtropicaldualclifford_add: (a: number, b: number) => number;
2890
+ readonly wasmtropicaldualclifford_bind: (a: number, b: number) => number;
2891
+ readonly wasmtropicaldualclifford_bindingIdentity: () => number;
2892
+ readonly wasmtropicaldualclifford_bindingInverse: (a: number) => [number, number, number];
2893
+ readonly wasmtropicaldualclifford_bundle: (a: number, b: number, c: number) => number;
2894
+ readonly wasmtropicaldualclifford_cliffordSimilarity: (a: number, b: number) => number;
2810
2895
  readonly wasmtropicaldualclifford_distance: (a: number, b: number) => number;
2811
2896
  readonly wasmtropicaldualclifford_evaluate: (a: number, b: number) => number;
2812
2897
  readonly wasmtropicaldualclifford_extractGeometricFeatures: (a: number) => [number, number];
@@ -2820,18 +2905,16 @@ export interface InitOutput {
2820
2905
  readonly wasmtropicaldualclifford_interpolate: (a: number, b: number, c: number) => number;
2821
2906
  readonly wasmtropicaldualclifford_isZero: (a: number) => number;
2822
2907
  readonly wasmtropicaldualclifford_new: () => number;
2908
+ readonly wasmtropicaldualclifford_normalizeToUnit: (a: number) => number;
2823
2909
  readonly wasmtropicaldualclifford_random: () => number;
2910
+ readonly wasmtropicaldualclifford_randomVector: () => number;
2824
2911
  readonly wasmtropicaldualclifford_randomWithScale: (a: number) => number;
2825
2912
  readonly wasmtropicaldualclifford_scale: (a: number, b: number) => number;
2826
2913
  readonly wasmtropicaldualclifford_sensitivityAnalysis: (a: number) => number;
2914
+ readonly wasmtropicaldualclifford_similarity: (a: number, b: number) => number;
2827
2915
  readonly wasmtropicaldualclifford_transform: (a: number, b: number) => number;
2828
2916
  readonly wasmtropicaldualclifford_tropicalAttention: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
2829
- readonly wasmtropicaldualdistribution_attentionPolytope: (a: number) => [number, number];
2830
- readonly wasmtropicaldualdistribution_geometricAlignment: (a: number, b: number) => number;
2831
- readonly wasmtropicaldualdistribution_getVocabSize: (a: number) => number;
2832
- readonly wasmtropicaldualdistribution_klDivergence: (a: number, b: number) => [number, number, number];
2833
- readonly wasmtropicaldualdistribution_mostLikelySequence: (a: number, b: number) => [number, number];
2834
- readonly wasmtropicaldualdistribution_new: (a: number, b: number) => number;
2917
+ readonly wasmtropicaldualclifford_unbind: (a: number, b: number) => number;
2835
2918
  readonly wasmtropicalmeasure_infimum: (a: number, b: any, c: number, d: number) => [number, number, number, number];
2836
2919
  readonly wasmtropicalmeasure_supremum: (a: number, b: any, c: number, d: number) => [number, number, number, number];
2837
2920
  readonly wasmtropicalmeasure_tropicalIntegrate: (a: number, b: any, c: number, d: number, e: number) => [number, number, number];
@@ -2844,13 +2927,11 @@ export interface InitOutput {
2844
2927
  readonly wasmtropicalnumber_fromLogProb: (a: number) => number;
2845
2928
  readonly wasmtropicalnumber_isInfinity: (a: number) => number;
2846
2929
  readonly wasmtropicalnumber_isOne: (a: number) => number;
2847
- readonly wasmtropicalnumber_isZero: (a: number) => number;
2848
2930
  readonly wasmtropicalnumber_mul: (a: number, b: number) => number;
2849
2931
  readonly wasmtropicalnumber_neg: (a: number) => number;
2850
2932
  readonly wasmtropicalnumber_one: () => number;
2851
2933
  readonly wasmtropicalnumber_toProb: (a: number) => number;
2852
2934
  readonly wasmtropicalnumber_tropicalPow: (a: number, b: number) => number;
2853
- readonly wasmtropicalnumber_zero: () => number;
2854
2935
  readonly wasmtropicalpolynomial_evaluate: (a: number, b: number) => number;
2855
2936
  readonly wasmtropicalpolynomial_new: (a: number, b: number) => number;
2856
2937
  readonly wasmtropicalpolynomial_tropical_roots: (a: number) => any;
@@ -2862,13 +2943,16 @@ export interface InitOutput {
2862
2943
  readonly vectorfield_fromFunction3D: (a: any) => number;
2863
2944
  readonly wasmmultivector_norm: (a: number) => number;
2864
2945
  readonly wasmspacetimevector_t: (a: number) => number;
2946
+ readonly wasmtropicalnumber_zero: () => number;
2865
2947
  readonly wasmtropicalnumber_tropicalMul: (a: number, b: number) => number;
2866
2948
  readonly wasmtrajectorypoint_position: (a: number) => number;
2867
2949
  readonly wasmtropicalpolynomial_coefficients_count: (a: number) => number;
2950
+ readonly infogeomutils_softmax: (a: number, b: number) => [number, number];
2868
2951
  readonly __wbg_wasmparametricdensity_free: (a: number, b: number) => void;
2869
2952
  readonly __wbg_wasmprobabilitymeasure_free: (a: number, b: number) => void;
2870
2953
  readonly __wbg_vectorfield_free: (a: number, b: number) => void;
2871
2954
  readonly vectorfield_new: (a: any, b: number) => number;
2955
+ readonly wasmtropicalnumber_isZero: (a: number) => number;
2872
2956
  readonly wasmtropicalnumber_tropicalAdd: (a: number, b: number) => number;
2873
2957
  readonly wasmcommunity_cohesion_score: (a: number) => number;
2874
2958
  readonly wasmdualnumber_getReal: (a: number) => number;
@@ -2925,16 +3009,16 @@ export interface InitOutput {
2925
3009
  readonly wasmmultiobjectiveoptimizer_new: () => number;
2926
3010
  readonly wasmsimpleoptimizer_new: () => number;
2927
3011
  readonly wasmtropicalmeasure_new: () => number;
2928
- readonly wasm_bindgen_e07ba2a7d21574bf___convert__closures_____invoke___wasm_bindgen_e07ba2a7d21574bf___JsValue_____: (a: number, b: number, c: any) => void;
2929
- readonly wasm_bindgen_e07ba2a7d21574bf___closure__destroy___dyn_core_a2b7f04d45112077___ops__function__FnMut__wasm_bindgen_e07ba2a7d21574bf___JsValue____Output_______: (a: number, b: number) => void;
2930
- readonly wasm_bindgen_e07ba2a7d21574bf___convert__closures_____invoke___wasm_bindgen_e07ba2a7d21574bf___JsValue__wasm_bindgen_e07ba2a7d21574bf___JsValue_____: (a: number, b: number, c: any, d: any) => void;
2931
- readonly __wbindgen_malloc: (a: number, b: number) => number;
2932
- readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
2933
3012
  readonly __wbindgen_exn_store: (a: number) => void;
2934
3013
  readonly __externref_table_alloc: () => number;
2935
- readonly __wbindgen_externrefs: WebAssembly.Table;
3014
+ readonly __wbindgen_export_2: WebAssembly.Table;
2936
3015
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
3016
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
3017
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
3018
+ readonly __wbindgen_export_6: WebAssembly.Table;
2937
3019
  readonly __externref_table_dealloc: (a: number) => void;
3020
+ readonly closure40_externref_shim: (a: number, b: number, c: any) => void;
3021
+ readonly closure33_externref_shim: (a: number, b: number, c: any, d: any) => void;
2938
3022
  readonly __wbindgen_start: () => void;
2939
3023
  }
2940
3024