@justinelliottcobb/amari-wasm 0.9.5 → 0.9.7
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 +8 -8
- package/amari_wasm.js +24 -24
- package/amari_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/amari_wasm.d.ts
CHANGED
|
@@ -4,14 +4,6 @@
|
|
|
4
4
|
* Initialize the enumerative geometry module
|
|
5
5
|
*/
|
|
6
6
|
export function initEnumerative(): void;
|
|
7
|
-
/**
|
|
8
|
-
* Convert Lorentz factor to velocity
|
|
9
|
-
*/
|
|
10
|
-
export function gamma_to_velocity(gamma: number): number;
|
|
11
|
-
/**
|
|
12
|
-
* Convert velocity to Lorentz factor
|
|
13
|
-
*/
|
|
14
|
-
export function velocity_to_gamma(velocity_magnitude: number): number;
|
|
15
7
|
/**
|
|
16
8
|
* Validate that this module loaded correctly
|
|
17
9
|
*/
|
|
@@ -20,6 +12,14 @@ export function validate_relativistic_module(): boolean;
|
|
|
20
12
|
* Calculate light deflection angle for photon grazing massive object
|
|
21
13
|
*/
|
|
22
14
|
export function light_deflection_angle(impact_parameter: number, mass: number): number;
|
|
15
|
+
/**
|
|
16
|
+
* Convert velocity to Lorentz factor
|
|
17
|
+
*/
|
|
18
|
+
export function velocity_to_gamma(velocity_magnitude: number): number;
|
|
19
|
+
/**
|
|
20
|
+
* Convert Lorentz factor to velocity
|
|
21
|
+
*/
|
|
22
|
+
export function gamma_to_velocity(gamma: number): number;
|
|
23
23
|
/**
|
|
24
24
|
* Initialize the WASM module
|
|
25
25
|
*/
|
package/amari_wasm.js
CHANGED
|
@@ -231,16 +231,23 @@ export function initEnumerative() {
|
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
/**
|
|
234
|
-
*
|
|
235
|
-
* @
|
|
234
|
+
* Validate that this module loaded correctly
|
|
235
|
+
* @returns {boolean}
|
|
236
|
+
*/
|
|
237
|
+
export function validate_relativistic_module() {
|
|
238
|
+
const ret = wasm.validate_relativistic_module();
|
|
239
|
+
return ret !== 0;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Calculate light deflection angle for photon grazing massive object
|
|
244
|
+
* @param {number} impact_parameter
|
|
245
|
+
* @param {number} mass
|
|
236
246
|
* @returns {number}
|
|
237
247
|
*/
|
|
238
|
-
export function
|
|
239
|
-
const ret = wasm.
|
|
240
|
-
|
|
241
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
242
|
-
}
|
|
243
|
-
return ret[0];
|
|
248
|
+
export function light_deflection_angle(impact_parameter, mass) {
|
|
249
|
+
const ret = wasm.light_deflection_angle(impact_parameter, mass);
|
|
250
|
+
return ret;
|
|
244
251
|
}
|
|
245
252
|
|
|
246
253
|
/**
|
|
@@ -257,23 +264,16 @@ export function velocity_to_gamma(velocity_magnitude) {
|
|
|
257
264
|
}
|
|
258
265
|
|
|
259
266
|
/**
|
|
260
|
-
*
|
|
261
|
-
* @
|
|
262
|
-
*/
|
|
263
|
-
export function validate_relativistic_module() {
|
|
264
|
-
const ret = wasm.validate_relativistic_module();
|
|
265
|
-
return ret !== 0;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
* Calculate light deflection angle for photon grazing massive object
|
|
270
|
-
* @param {number} impact_parameter
|
|
271
|
-
* @param {number} mass
|
|
267
|
+
* Convert Lorentz factor to velocity
|
|
268
|
+
* @param {number} gamma
|
|
272
269
|
* @returns {number}
|
|
273
270
|
*/
|
|
274
|
-
export function
|
|
275
|
-
const ret = wasm.
|
|
276
|
-
|
|
271
|
+
export function gamma_to_velocity(gamma) {
|
|
272
|
+
const ret = wasm.gamma_to_velocity(gamma);
|
|
273
|
+
if (ret[2]) {
|
|
274
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
275
|
+
}
|
|
276
|
+
return ret[0];
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
function passArrayF64ToWasm0(arg, malloc) {
|
|
@@ -5258,7 +5258,7 @@ function __wbg_get_imports() {
|
|
|
5258
5258
|
const ret = arg0.length;
|
|
5259
5259
|
return ret;
|
|
5260
5260
|
};
|
|
5261
|
-
imports.wbg.
|
|
5261
|
+
imports.wbg.__wbg_log_3cc7740e30649ca2 = function(arg0, arg1) {
|
|
5262
5262
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
5263
5263
|
};
|
|
5264
5264
|
imports.wbg.__wbg_log_6c7b5f4f00b8ce3f = function(arg0) {
|
package/amari_wasm_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"Amari Contributors"
|
|
6
6
|
],
|
|
7
7
|
"description": "WebAssembly bindings for Amari mathematical computing library - geometric algebra, tropical algebra, automatic differentiation, fusion systems, and information geometry",
|
|
8
|
-
"version": "0.9.
|
|
8
|
+
"version": "0.9.7",
|
|
9
9
|
"license": "MIT OR Apache-2.0",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|