@justinelliottcobb/amari-wasm 0.9.6 → 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 CHANGED
@@ -5,21 +5,21 @@
5
5
  */
6
6
  export function initEnumerative(): void;
7
7
  /**
8
- * Convert velocity to Lorentz factor
8
+ * Validate that this module loaded correctly
9
9
  */
10
- export function velocity_to_gamma(velocity_magnitude: number): number;
10
+ export function validate_relativistic_module(): boolean;
11
11
  /**
12
12
  * Calculate light deflection angle for photon grazing massive object
13
13
  */
14
14
  export function light_deflection_angle(impact_parameter: number, mass: number): number;
15
15
  /**
16
- * Convert Lorentz factor to velocity
16
+ * Convert velocity to Lorentz factor
17
17
  */
18
- export function gamma_to_velocity(gamma: number): number;
18
+ export function velocity_to_gamma(velocity_magnitude: number): number;
19
19
  /**
20
- * Validate that this module loaded correctly
20
+ * Convert Lorentz factor to velocity
21
21
  */
22
- export function validate_relativistic_module(): boolean;
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,12 @@ export function initEnumerative() {
231
231
  }
232
232
 
233
233
  /**
234
- * Convert velocity to Lorentz factor
235
- * @param {number} velocity_magnitude
236
- * @returns {number}
234
+ * Validate that this module loaded correctly
235
+ * @returns {boolean}
237
236
  */
238
- export function velocity_to_gamma(velocity_magnitude) {
239
- const ret = wasm.velocity_to_gamma(velocity_magnitude);
240
- if (ret[2]) {
241
- throw takeFromExternrefTable0(ret[1]);
242
- }
243
- return ret[0];
237
+ export function validate_relativistic_module() {
238
+ const ret = wasm.validate_relativistic_module();
239
+ return ret !== 0;
244
240
  }
245
241
 
246
242
  /**
@@ -255,12 +251,12 @@ export function light_deflection_angle(impact_parameter, mass) {
255
251
  }
256
252
 
257
253
  /**
258
- * Convert Lorentz factor to velocity
259
- * @param {number} gamma
254
+ * Convert velocity to Lorentz factor
255
+ * @param {number} velocity_magnitude
260
256
  * @returns {number}
261
257
  */
262
- export function gamma_to_velocity(gamma) {
263
- const ret = wasm.gamma_to_velocity(gamma);
258
+ export function velocity_to_gamma(velocity_magnitude) {
259
+ const ret = wasm.velocity_to_gamma(velocity_magnitude);
264
260
  if (ret[2]) {
265
261
  throw takeFromExternrefTable0(ret[1]);
266
262
  }
@@ -268,12 +264,16 @@ export function gamma_to_velocity(gamma) {
268
264
  }
269
265
 
270
266
  /**
271
- * Validate that this module loaded correctly
272
- * @returns {boolean}
267
+ * Convert Lorentz factor to velocity
268
+ * @param {number} gamma
269
+ * @returns {number}
273
270
  */
274
- export function validate_relativistic_module() {
275
- const ret = wasm.validate_relativistic_module();
276
- return ret !== 0;
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,12 +5258,12 @@ function __wbg_get_imports() {
5258
5258
  const ret = arg0.length;
5259
5259
  return ret;
5260
5260
  };
5261
+ imports.wbg.__wbg_log_3cc7740e30649ca2 = function(arg0, arg1) {
5262
+ console.log(getStringFromWasm0(arg0, arg1));
5263
+ };
5261
5264
  imports.wbg.__wbg_log_6c7b5f4f00b8ce3f = function(arg0) {
5262
5265
  console.log(arg0);
5263
5266
  };
5264
- imports.wbg.__wbg_log_ebffc6906074deb0 = function(arg0, arg1) {
5265
- console.log(getStringFromWasm0(arg0, arg1));
5266
- };
5267
5267
  imports.wbg.__wbg_new_19c25a3f2fa63a02 = function() {
5268
5268
  const ret = new Object();
5269
5269
  return ret;
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.6",
8
+ "version": "0.9.7",
9
9
  "license": "MIT OR Apache-2.0",
10
10
  "repository": {
11
11
  "type": "git",