@justinelliottcobb/amari-wasm 0.9.10 → 0.11.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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @justinelliottcobb/amari-wasm v0.9.8
1
+ # @justinelliottcobb/amari-wasm v0.9.10
2
2
 
3
3
  **Unified Mathematical Computing Library with High-Precision WebAssembly Support**
4
4
 
@@ -15,6 +15,7 @@ Amari is a comprehensive mathematical computing library that brings advanced alg
15
15
  - **Geometric Algebra (Clifford Algebra)**: Multivectors, rotors, and geometric products for 3D rotations and spatial transformations
16
16
  - **Tropical Algebra**: Max-plus semiring operations for optimization and neural network applications
17
17
  - **Automatic Differentiation**: Forward-mode AD with dual numbers for exact derivatives
18
+ - **Measure Theory** *(new in v0.10.0)*: Lebesgue integration, probability measures, and measure-theoretic foundations
18
19
  - **Relativistic Physics**: Spacetime algebra (Cl(1,3)) with WebAssembly-compatible precision
19
20
  - **Spacecraft Orbital Mechanics**: Full-precision trajectory calculations in browsers
20
21
  - **Cellular Automata**: Geometric cellular automata with multivector states
@@ -186,6 +187,27 @@ for (let i = 0; i < 100; i++) {
186
187
  console.log(`Generation: ${ca.generation()}`);
187
188
  ```
188
189
 
190
+ ### Measure Theory and Integration *(new in v0.10.0)*
191
+
192
+ Perform numerical integration and work with probability measures:
193
+
194
+ ```typescript
195
+ import { WasmLebesgueMeasure, WasmProbabilityMeasure, integrate } from '@justinelliottcobb/amari-wasm';
196
+
197
+ // Lebesgue measure - compute volumes
198
+ const measure = new WasmLebesgueMeasure(3); // 3D space
199
+ const volume = measure.measureBox([2.0, 3.0, 4.0]); // 2×3×4 box = 24
200
+
201
+ // Numerical integration
202
+ const f = (x) => x * x; // Function to integrate
203
+ const result = integrate(f, 0, 2, 1000, WasmIntegrationMethod.Riemann);
204
+ console.log(`∫₀² x² dx ≈ ${result}`); // ≈ 2.667
205
+
206
+ // Probability measures
207
+ const prob = WasmProbabilityMeasure.uniform(0, 1);
208
+ const p = prob.probabilityInterval(0.25, 0.75, 0, 1); // P(0.25 ≤ X ≤ 0.75) = 0.5
209
+ ```
210
+
189
211
  ## Use Cases
190
212
 
191
213
  - Computer Graphics: 3D rotations and transformations using rotors
@@ -193,6 +215,7 @@ console.log(`Generation: ${ca.generation()}`);
193
215
  - Machine Learning: Tropical neural networks and automatic differentiation
194
216
  - Optimization: Tropical algebra for shortest path and scheduling problems
195
217
  - Scientific Computing: High-performance mathematical operations with orbital-grade precision
218
+ - Probability & Statistics: Measure theory and numerical integration for statistical computations
196
219
  - Game Development: Efficient spatial transformations and physics
197
220
  - Spacecraft Trajectory Planning: High-precision orbital mechanics in web applications
198
221